24.06.2015, 20:26
Here:
The problem is, i got Auto Spawned without reason.
#Sorryformybadenglish
PHP код:
public OnPlayerSpawn(playerid)
{
if(pInfo[playerid][Login] == 0) return Kick(playerid);
// Anti fake kill
SetPVarInt(playerid,"K_Times",0);
// business
pInfo[playerid][CurrentBusiness] = 0;
// house
pInfo[playerid][CurrentHouse] = 0;
// war system
if(pInfo[playerid][InWar] == 1)
{
SetPlayerPos(playerid,1351.4365,2147.5635,11.0156);
SetPlayerVirtualWorld(playerid,gInfo[pInfo[playerid][gID]][WarID]);
GivePlayerWeapon(playerid,26,999999999);
GivePlayerWeapon(playerid,24,999999999);
GivePlayerWeapon(playerid,32,999999999);
GivePlayerWeapon(playerid,31,999999999);
SMT(playerid,"~n~~r~~h~GROUP WAR !");
SMTD(playerid,"~r~|| ~w~Ketik ~y~/lgwar ~w~untuk keluar dari group war!",10);
}
if(pInfo[playerid][Color] == 0)
{
new exd = PlayerColors[ random( 200 ) ];
SetPlayerColor(playerid,exd);
pInfo[playerid][Color] = exd;
}
if(pInfo[playerid][Skin] != -1 && GPVI(playerid,"mGameType") != 1)
{
SetPlayerSkin(playerid,pInfo[playerid][Skin]);
}
// money bag
if(pInfo[playerid][GetMoney] == 1)
{
SetPlayerAttachedObject(playerid, 9, 1550, 1, 0.041999,-0.260000,-0.031999,41.500000,90.800010,123.799987,1.000000,1.000000,1.000000);
}
// Mnigames
if(pInfo[playerid][Minigame]== 1)
{
MinigamesJoin(playerid,GetPVarInt(playerid,"mGameType"));
}
else
{
LoadToys(playerid);
}
if( pInfo[playerid][JailTime] != 1 && pInfo[playerid][Minigame] != 1 && pInfo[playerid][InWar] != 1)
{
SpawnHouse(playerid);
}
// Vips system
if(pInfo[playerid][VIP] != 0 || pInfo[playerid][Admin] > 5)
{
SetPlayerArmour(playerid,50);
}
// Jail system
if(pInfo[playerid][JailTime] != 0)
{
SetPlayerJail(playerid);
}
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
// Race system
pInfo[playerid][InRace] = -1;
RaceCheckpoint[playerid] = -1;
// anims
AnimsLoad(playerid);
return 1;
}
#Sorryformybadenglish