OnPlayerSpawn benutz ich nur für das Krankenhaus...
public OnPlayerSpawn(playerid)
{
new User[32];
format(User,32,"/User/%s.ini",GetPName(playerid));
switch(Tot[playerid])
{
case 0:
{
if(dini_Int(User,"Skin") == 0)
{
dini_IntSet(User,"Skin",2);
SetPlayerSkin(playerid, 2);
}
else
{
SetPlayerSkin(playerid, dini_Int(User,"Skin"));
}
}
case 1:
{
SetPlayerPos(playerid,1160.815063, -1324.329467, 15.098136);
TogglePlayerSpectating(playerid,1);
TogglePlayerControllable(playerid,0);
//1286.258178, -1324.843261, 43.276679
InterpolateCameraPos(playerid, DPX[playerid], DPY[playerid], DPZ[playerid], 1225.278442, -1308.195556, 17.473649, 10000);
InterpolateCameraLookAt(playerid, 1291.243530, -1324.691406, 43.627956, 1220.674316, -1310.138793, 17.633779, 1000);
ClearCFP(playerid);
SendClientMessage(playerid,RED,"---|Krankenhaus|---");
SendClientMessage(playerid,RED,"Du wurdest mit einem Rettungswagen hierhergebracht");
SendClientMessage(playerid,RED,"weil du Ohnmächtig aufgefunden wurdest !");
SendClientMessage(playerid,RED,"Je nach schwere deiner Verletzungen wird ein Arzt");
SendClientMessage(playerid,RED,"dich 2 bis 8 Ingame Minuten behandeln !");
SendClientMessage(playerid,RED,"Dir werden deine Waffen und Behandlungskosten abgezogen !");
SendClientMessage(playerid,RED,"---|Krankenhaus|---");
ResetPlayerWeapons(playerid);
Tot[playerid] = 0;
switch(random(3))
{
case 0:
{
SetTimerEx("KHTimer",30000,0,"d",playerid);
GivePMoney(playerid,-200);
}
case 1:
{
SetTimerEx("KHTimer",60000,0,"d",playerid);
GivePMoney(playerid,-400);
}
case 2:
{
SetTimerEx("KHTimer",90000,0,"d",playerid);
GivePMoney(playerid,-600);
}
case 3:
{
SetTimerEx("KHTimer",1200000,0,"d",playerid);
GivePMoney(playerid,-800);
}
}
}
}
return 1;
}
Aber hier nochmal der OnPlayerRequestClass
public OnPlayerRequestClass(playerid, classid)
{
new User[32];
format(User,32,"/User/%s.ini",GetPName(playerid));
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
SelectTextDraw(playerid, ORANGE);
InTDBox[playerid] = 1;
LoggedIn[playerid] = 0;
switch(dini_Exists(User))
{
case 0:
{
TextDrawSetString(Textdraw4,"Registrieren");
SetSpawnInfo(playerid,0,dini_Int(User,"Skin"),409.0820,-1544.0743,32.2734,224.0865,0,0,0,0,0,0);
}
case 1:
{
TextDrawSetString(Textdraw4,"Einloggen");
SetSpawnInfo(playerid,0,dini_Int(User,"Skin"),dini_Float(User,"X"),dini_Float(User,"Y"),dini_Float(User,"Z"),dini_Float(User,"A"),0,0,0,0,0,0);
}
}
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid, 1);
return 1;
}