Hier ist OnPlayerSpawn Ich weiß selber das es Umständlich gescriptet ist und es kürzter gehen könnte xD
AddPlayerClass habe ich Das hier AddPlayerClass(56,220.7402,108.4864,1010.2188,153.2551,0,0,0,0,0,0); das ist I-wo in der luft da es ja eigentlich egal ist wo es ist
public OnPlayerSpawn(playerid)
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Spawns
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if(!IsPlayerNPC(playerid))
{
if(Eingeloggt[playerid] == 1)
{
SpielerInfo[playerid][Spawn]++;
}
if(Eingeloggt[playerid] == 0)
{
SendClientMessage(playerid,Rot,"Da du dich nicht eingelogt hast, wurdest du gekickt!");
SendClientMessage(playerid,Rot,"Benutze das nächste mal /login um dich einzulogen!");
Kick(playerid);
}
if(SpielerInfo[playerid][Jailtime] > 0)
{
SetTimerEx("Unjail", SpielerInfo[playerid][Jailtime]*60000, 0, "i", playerid);
SetPlayerPos(playerid,1413.9099,-1460.8789,114.3154);
ResetPlayerWeapons(playerid);
GameTextForPlayer(playerid, "~r~Zurück in den Knast !!!", 5000, 4);
}
SetPlayerArmour(playerid,0);
SetPlayerColor(playerid,WEIß);
SetPlayerInterior(playerid,0);
if(SpielerInfo[playerid][Krankenhaus] == 1)
{
SetPlayerPos(playerid,2042.7557,-1400.7588,18.9470);
SetPlayerCameraPos(playerid,1993.3033,-1462.6324,57.7334);
SetPlayerCameraLookAt(playerid,2036.5002,-1410.3998,17.1641);
DeadTimer = SetTimerEx("IsDead24",120000 ,false,"i",playerid);
TogglePlayerControllable(playerid,false);
}
if(SpielerInfo[playerid][Knast] == 1)
{
DeadTimer = SetTimerEx("KnastTime",60000 ,false,"i",playerid);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,215.0463,109.1821,999.0156);
SpielerInfo[playerid][Knast] = 1;
SendClientMessage(playerid,ROT,"Du bist wieder im Knast für 1 Minute");
}
if(SpielerInfo[playerid][Knast] == 2)
{
DeadTimer = SetTimerEx("KnastTime",120000 ,false,"i",playerid);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,215.0463,109.1821,999.0156);
SpielerInfo[playerid][Knast] = 2;
SendClientMessage(playerid,ROT,"Du bist wieder im Knast für 2 Minuten");
}
if(SpielerInfo[playerid][Knast] == 3)
{
DeadTimer = SetTimerEx("Knast",180000 ,false,"i",playerid);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,215.0463,109.1821,999.0156);
SpielerInfo[playerid][Knast] = 3;
SendClientMessage(playerid,ROT,"Du bist wieder im Knast für 3 Minuten");
}
if(SpielerInfo[playerid][Knast] == 4)
{
DeadTimer = SetTimerEx("KnastTime",240000 ,false,"i",playerid);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,215.0463,109.1821,999.0156);
SpielerInfo[playerid][Knast] = 4;
SendClientMessage(playerid,ROT,"Du bist wieder im Knast für 4 Minuten");
}
if(SpielerInfo[playerid][Knast] == 5)
{
DeadTimer = SetTimerEx("KnastTime",300000 ,false,"i",playerid);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,215.0463,109.1821,999.0156);
SpielerInfo[playerid][Knast] = 5;
SendClientMessage(playerid,ROT,"Du bist wieder im Knast für 5 Minuten");
}
if(SpielerInfo[playerid][Knast] == 6)
{
DeadTimer = SetTimerEx("KnastTime",360000 ,false,"i",playerid);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,215.0463,109.1821,999.0156);
SpielerInfo[playerid][Knast] = 6;
SendClientMessage(playerid,ROT,"Du bist wieder im Knast für 6 Minuten");
}
if(SpielerInfo[playerid][Knast] == 0)
{
if(SpielerInfo[playerid][Krankenhaus] == 0)
{
if(SpielerInfo[playerid][Chef] == 0 || SpielerInfo[playerid][Firma] == 0)
{
SetPlayerPos(playerid,1470.5858,-1770.7783,18.7958);
SetPlayerFacingAngle(playerid,272.3380);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
}
if(SpielerInfo[playerid][Chef] == 1 || SpielerInfo[playerid][Firma] == 1)
{
SetPlayerPos(playerid,228.0108,122.4170,1010.2188);
SetPlayerFacingAngle(playerid,268.9147);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,10);
SpielerInfo[playerid][Duty] = 0;
}
if(SpielerInfo[playerid][Chef] == 2 || SpielerInfo[playerid][Firma] == 2)
{
SetPlayerPos(playerid,2024.9181,-1404.2904,17.2067);
SetPlayerFacingAngle(playerid,176.1051);
SetCameraBehindPlayer(playerid);
}
if(SpielerInfo[playerid][Chef] == 3 || SpielerInfo[playerid][Firma] == 3)
{
SetPlayerPos(playerid,323.4792,-1484.4117,24.9438);
SetPlayerFacingAngle(playerid,145.6079);
SetCameraBehindPlayer(playerid);
}
if(SpielerInfo[playerid][Chef] == 4 || SpielerInfo[playerid][Firma] == 4)
{
SetPlayerPos(playerid,2511.5583,-1651.4462,13.8955);
SetPlayerFacingAngle(playerid,137.611);
SetCameraBehindPlayer(playerid);
}
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Spawn ClearChat
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
SendClientMessage(playerid,SCHWARTZ," ");
}
if(IsPlayerNPC(playerid))
{
new botname1[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname1, sizeof(botname1));
if(!strcmp(botname1, "HydraLS", true))
{
PutPlayerInVehicle(playerid,BotHydra,0);
}
new botname11[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname11, sizeof(botname1));
if(!strcmp(botname11, "BusFahrerLinie1", true))
{
PutPlayerInVehicle(playerid,Linie1,0);
}
new botname111[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname111, sizeof(botname1));
if(!strcmp(botname111, "BusFahrerLinie2", true))
{
PutPlayerInVehicle(playerid,Linie2,0);
}
new botname1111[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname1111, sizeof(botname1));
if(!strcmp(botname1111, "BusFahrerLinie3", true))
{
PutPlayerInVehicle(playerid,Linie3,0);
}
}
return 1;
}