Guten Tag / Abend / Mittag liebes SAMP Forum...
Ich bin gerade dabei ein Script zu schreiben jedoch hab ich ein sehr großes Problem bei "OnPlayerSpawn"
Und zwar möchte ich, dass wenn man SpielerInfo[playerid][pMember] == XXX ist, dass man dann auf diesen bestimmten Plätzen Spawnt.
Soweit so gut... aber immer sobald man stirbt, dann spawnt man am AddPlayerClass(1, 1797.3000488281,-1302.3000488281,121.59999847412, 269.1425, 0, 0, 0, 0, 0, 0); Spawn....
Habt ihr eine Idee / Verbesserung, sodass man auf jeden fall am richtiges Spawnplatz Spawnt?!
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,TextALOG0);
SkinChoose[playerid] = 0;
gettime(hour, minute);
SetPlayerTime(playerid,hour,minute);
if(GetPVarInt(playerid,"Eingeloggt") == 0)
{
Kick(playerid);
}
if(LoginTexShow[playerid] == 0)
{
EssenUpdate(playerid);
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
LoginTexShow[playerid] = 1;
TextDrawShowForPlayer(playerid, TextALOG0);
TextDrawShowForPlayer(playerid, TextALOG1);
TextDrawShowForPlayer(playerid, ExtraLeben1);
TextDrawShowForPlayer(playerid, ExtraLeben2);
TextDrawShowForPlayer(playerid, ExtraLeben3[playerid]);
TextDrawShowForPlayer(playerid, ExtraLeben4);
TextDrawShowForPlayer(playerid, ExtraLeben5);
TextDrawShowForPlayer(playerid, ExtraLeben6[playerid]);
//TextDrawShowForPlayer(playerid, TextALOG2);
}
if(SpielerInfo[playerid][pMember] == 1) //Cop
{
SetPlayerPos(playerid,246.7565,122.9047,1003.2188);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 12);
SetPlayerInterior(playerid, 10);
SetPlayerFacingAngle( playerid, 180);
GivePlayerWeapon(playerid, 3 , 1);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 31, 5000);
}
else if(SpielerInfo[playerid][pMember] == 2) //Bundeswehr
{
SetPlayerPos(playerid,-1329.7958,442.5168,7.1875);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 0);
GivePlayerWeapon(playerid, 16, 1);
GivePlayerWeapon(playerid, 24, 150);
GivePlayerWeapon(playerid, 32, 550);
GivePlayerWeapon(playerid, 31, 5000);
}
else if(SpielerInfo[playerid][pMember] == 3) //O-Amt
{
SetPlayerPos(playerid,1626.4915,-1890.6545,13.5501);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 0);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 10000);
}
else if(SpielerInfo[playerid][pMember] == 4) //Arzt
{
SetPlayerPos(playerid,2024.3173,-1405.9546,17.2009);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 0);
GivePlayerWeapon(playerid, 41, 10000);
}
else if(SpielerInfo[playerid][pMember] == 5) //Prässsi
{
SetPlayerPos(playerid,1139.4537,-2037.2264,69.0078);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 270);
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 10000);
GivePlayerWeapon(playerid, 24, 250);
GivePlayerWeapon(playerid, 28, 1000);
}
else if(SpielerInfo[playerid][pMember] == 6) //Reporter
{
SetPlayerPos(playerid,1788.2181,-1295.8845,13.4506);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 25);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 180);
GivePlayerWeapon(playerid, 41, 10000);
GivePlayerWeapon(playerid, 43, 10000);
}
else if(SpielerInfo[playerid][pMember] == 8) //Fahrlehrer
{
SetPlayerPos(playerid,2047.7585,-1911.0844,13.5469);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 25);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 270);
GivePlayerWeapon(playerid, 41, 10000);
}
else if(SpielerInfo[playerid][pMember] == 20) //20 Street Mafia
{
SetPlayerPos(playerid,2202.6770,-994.5167,63.9297);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 25);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 160);
GivePlayerWeapon(playerid, 23, 500);
GivePlayerWeapon(playerid, 28, 10000);
GivePlayerWeapon(playerid, 17, 3);
}
else if(SpielerInfo[playerid][pMember] == 21) //RIFA
{
SetPlayerPos(playerid,-348.4044,-1050.5668,59.3113);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 25);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 165);
GivePlayerWeapon(playerid, 23, 500);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 31, 2000);
}
else if(SpielerInfo[playerid][pMember] == 22) //Hitman
{
SetPlayerPos(playerid,726.7432,-1438.9960,13.5391);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 25);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 0);
GivePlayerWeapon(playerid, 23, 500);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 28, 2000);
}
else if(SpielerInfo[playerid][pMember] == 23) //Tridas (Deaktiviert)
{
Kick(playerid);
}
else if(SpielerInfo[playerid][pMember] == 22) //Grove Street
{
SetPlayerPos(playerid,2495.3879,-1684.6165,13.5153);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 25);
SetPlayerSkin(playerid, 12);
SetPlayerFacingAngle( playerid, 0);
GivePlayerWeapon(playerid, 24, 500);
GivePlayerWeapon(playerid, 25, 500);
GivePlayerWeapon(playerid, 32, 2000);
GivePlayerWeapon(playerid, 41, 500);
}
else if(SpielerInfo[playerid][pMember] == 0)
{
SetPlayerPos(playerid,404.2339,-1799.2118,7.8281);
SetPlayerHealth(playerid, 75);
SetPlayerArmour(playerid, 0);
SetPlayerSkin(playerid, SpielerInfo[playerid][pSkin]);
}
return 1;
}
PS: Man sollte je nach Fraktion / pMember wo anders Spawnen (Siehe Script)
Vielen Dank im Vorraus..
Mfg Pascal aka iVirtual