nein habe keinen aber wie mache ich einen ?? hier habe das alles #include <a_samp>
#include dini
#define COLOR_GREY 0xAFAFAFAA
#define TEAM_POLIZEI 2
#if defined FILTERSCRIPT
new Spieler[MAX_PLAYERS][spieler_daten];
new accFormat[128];
enum spieler_daten
{
skin,
leader,
team,
eingeloggt,
}
main()
{
print("\n----------------------------------");
print(" PWK");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("testserver");
AddPlayerClass(172, 1958.3783, 1343.1572, 15.3746, 269.1425, 26, 50, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"%s.datei",pname);
dini_IntSet(accFormat, "skin", GetPlayerSkin(playerid));
if(fexist(accFormat) && Spieler[playerid][eingeloggt])
{
dini_IntSet(accFormat,"team",Spieler[playerid][team]);
dini_IntSet(accFormat,"leader",Spieler[playerid][leader]);
dini_IntSet(accFormat, "skin", GetPlayerSkin(playerid));
}
Spieler[playerid][team] = 0;
Spieler[playerid][leader] = 0;
Spieler[playerid][eingeloggt] = 0;
Spieler[playerid][skin] = GetPlayerSkin(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"%s.datei",pname);
SetPlayerSkin(playerid, dini_Int(accFormat,"skin"));
{
}
Spieler[playerid][Fraktion] == 1 //team polizei
{
SetPlayerPos(playerid, 199.4538,168.0576,1003.0234 );
SetPlayerInterior(playerid, 0);
GivePlayerWeapon(playerid, 24, 50); GivePlayerWeapon(playerid, 29, 150);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(strget(cmdtext,0),"/makeleader"))
{
if(Spieler[playerid][Admin] >= 4 )
{
if(!strlen(strget(cmdtext,1)))
return
SendClientMessage(playerid,COLOR_GREY,"Benutze: /makeleader [ID] [FraktionsID]");
//new string[128];
new id3 = strval(strget(cmdtext,1));
new admin3[MAX_PLAYER_NAME];
new gang = strval(strget(cmdtext,2));
GetPlayerName(id3,admin3,sizeof(admin3));
format(string, sizeof(string), "*** Du wurdest von Admin %s zum Leader der Fraktionsnummer %d gemacht.", admin3, gang);
SendClientMessage(id3, COLOR_LIGHTRED, string);
format(string, sizeof(string), "*** Du hast %s zum Leader der Fraktionsnummer %d gemacht.", id3, gang);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
if(gang==1) { SetPlayerSkin(id3,280);Spieler[playerid][leader]= 1; }
Spieler[id3][leader] = gang;
Spieler[id3][team] = gang;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED,"Du darfst diesen Befehl nicht benutzen !");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
Spieler[playerid][team] = dini_Int(accFormat,"team");
Spieler[playerid][leader] = dini_Int(accFormat,"leader");
Spieler[playerid][skin] =SetPlayerSkin(playerid, dini_Int(accFormat,"skin"));
Spieler[playerid][eingeloggt] = 1; // Spieler ist nun erfolgreich eingeloggt
SendClientMessage(playerid,0xFFFFFFFF,"Du wurdest erfolgreich eingeloggt.");//...euer code
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock strget(strx[], pos, search = ' ') {
new arg, ret[128], idxx;
for (new i = 0; i < strlen(strx); i++) {
if(strx[i] == search || i == strlen(strx) || strx[i + 1] == 10) {
arg++;
if (arg == pos + 1){
ret[i-idxx] = EOS;
return ret;
} else if (arg == pos)
idxx= i+1;
}
else if (arg == pos)
ret[i - idxx] = strx[i];
}
return ret;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}