Das ist nicht mein Originales Script ich bin gerade bei nem Kumpel und die Daten hat er nich aber es kackt immer noch ab obwohl ich es bei Onplayer... eingefügt habe.
#include <a_samp>
static gTeam[MAX_PLAYERS];
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define TEAM_TRANSPORTGMBH 0
#define TEAM_NEWSREPORTER 1
#define TEAM_POLIZEI 2
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" AC-Reallife Server by Aleks und Chissi");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" AC-Reallife Server by Aleks und Chissi");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0) //wenn der Spieler den ersten Skin auswählt
{
gTeam[playerid] = TEAM_TRANSPORTGMBH;
}
if(classid == 1) //wenn der Spieler den zweiten Skin auswählt
{
gTeam[playerid] = TEAM_NEWSREPORTER;
}
if(classid == 2) //wenn der Spieler den dritten Skin auswählt
{
gTeam[playerid] = TEAM_POLIZEI;
}
return 1;
}
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 OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
strcmp(strget(cmdtext,0),"/makeleader")) {
if(IsPlayerAdmin(playerid)) {
if(strlen(strget(cmdtext,1))) {
new typ=strval(strget(cmdtext,1));//der erste Parameter wird ausgelesen (die Spieler ID (in diesem Fall 1))
if(IsPlayerConnected(typ)) {//es wird überprüft, ob der Spieler (in diesem Fall 1) connected ist
if(strlen(strget(cmdtext,2))) {
new team=strval(strget(cmdtext,2)), s[100], js[20], skin;//das zweite Parameter (die Jobid) wird ausgelsen (in diesem Fall 1 (Polizei))
gTeam[typ]=team;//bei /makeleader 1 1 betritt die ID 1 das Team 1 (in diesem Fall Polizei)
if(team==1) { format(js,sizeof(js),"Newsreporter"); skin= 29; }
SetPlayerColor(typ, 0x0E84F6F4);
if(team==0) { format(js,sizeof(js),"TransportGmbh"); skin= 115; }
SetPlayerColor(typ, 0x48BF7DEC);
if(team==2) { format(js,sizeof(js),"Polizei"); skin=288; }
SetPlayerColor(typ, 0x000000F4);
format(s,sizeof(s),"Du wurdest zum Leiter der %s gemacht",js);
SendClientMessage(typ,COLOR_GREEN,s);// hier kam bei mir der error weil ich "farbe" nicht definiert hatte, habs mal geändert
SetPlayerSkin(typ,skin); }
else { SendClientMessage(playerid, 0xC10000EF,"/makeleader Spielerid Jobid"); }}
else { SendClientMessage(playerid, 0xC10000EF,"Spieler ID nicht vergeben"); }}
else { SendClientMessage(playerid, 0xC10000EF,"/makeleader Spielerid Jobid"); }}
else { SendClientMessage(playerid, 0xC10000EF,"Du kannst das nicht"); }
return 1;
}
public OnPlayerInfoChange(playerid)
{
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}