13.10.2009, 22:43 
	
	
	
		Well i did /nrg command to spawn you NRG-500, but people are spamming it....Is there any idea so it cant be spammed, and doesnt respawn again
	
	
	
	
| 
 
					Originally Posted by MartinDaniel  
Well i did /nrg command to spawn you NRG-500, but people are spamming it....Is there any idea so it cant be spammed, and doesnt respawn again 
 | 
	if (strcmp("/nrg", cmdtext, true, 10) == 0)
	{
		new Float: X, Float: Y, Float: Z, Float: A;
		GetPlayerPos(playerid,X,Y,Z);
		GetPlayerFacingAngle(playerid,A);
		new car = CreateVehicle(522,X,Y,Z,A,-1,-1,120000);
		PutPlayerInVehicle(playerid,car,0);
		return 1;
	}
new Spawned[MAX_PLAYERS];//global varible
Spawned[playerid] = 0;// add under onplayerconnect
if (strcmp("/nrg", cmdtext, true, 10) == 0)
{
if(Spawned[playerid] == 1)
{
SendClientMessage(playerid, yourcolor, " You already spawned a nrg500");
retrun 1;
}
new Float: X, Float: Y, Float: Z, Float: A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
new car = CreateVehicle(522,X,Y,Z,A,-1,-1,120000);
PutPlayerInVehicle(playerid,car,0);
Spawned[playerid] = 1;
return 1;
}
	
| 
 
					Originally Posted by MartinDaniel  
It works now, thanks  
![]()  |