03.11.2012, 09:48
Hello everybody, i have problem with my OnPlayerDeath, when im dead, i have spawn menu, but i dont need it
http://www.part.lt/img/f9e4134bc1288...e0f212d926.png - Photo of the problem
When im press SPAWN, im spawned, and when im die another time, everything is okay...
When im do relog and die again, everything is fucked again. Someone help
ONPLAYERSPAWN
http://www.part.lt/img/f9e4134bc1288...e0f212d926.png - Photo of the problem
When im press SPAWN, im spawned, and when im die another time, everything is okay...
When im do relog and die again, everything is fucked again. Someone help
Код:
public OnPlayerDeath(playerid, killerid, reason) { if ( killerid == INVALID_PLAYER_ID ) { SetPlayerInterior ( playerid, 0 ); new Random = random(sizeof(RandomSpawns)); SetPlayerVirtualWorld ( playerid, 0 ); SetSpawnInfo( playerid, 0, GetPlayerSkin( playerid ), RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2],RandomSpawns[Random][3], 0, 0, 0, 0, 0, 0 ); } pInfo [ playerid ] [ spawned ] = false; return 1; }
Код:
if ( Numires[ playerid ]) { new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid,RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2] ); SetPlayerSkin( playerid, pInfo[ playerid ][ skinas ] ); SetPlayerFacingAngle ( playerid, RandomSpawns[Random][3] ); }