10.10.2011, 14:12
on top
new ObjectCount[MAX_PLAYERS];
OnPlayerSpawn
ObjectCount[playerid] = 0;
OnPlayerKeyStateChange
new ObjectCount[MAX_PLAYERS];
OnPlayerSpawn
ObjectCount[playerid] = 0;
OnPlayerKeyStateChange
pawn Код:
if(PRESSED(KEY_LOOK_BEHIND))
{
if(ObjectCount[playerid] < 4)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z)
CreateObject(...X,Y,Z...)
ObjectCount[playerid] ++
}
}