spawn car/nrg with a command
#4

What will happen when you write it like this?
PHP код:
new Float:Pos[3],inf[MAX_PLAYERS],nrg[MAX_PLAYERS];
if(!
strcmp(cmdtext,"/inf",true))
{
    if(
inf[playerid] == 0)
    {
        
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        
inf[playerid] = CreateVehicle(411,Pos[0],Pos[1],Pos[2],0,-1,-1,10);
        
PutPlayerInVehicle(playerid,inf[playerid],0);
        
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned An Infernus.");
        return 
1;
    }
    else if(
inf[playerid] > 0)
    {
        
DestroyVehicle(inf[playerid]);
        
inf[playerid] = 0;
    }
    return 
1;
}
if(!
strcmp(cmdtext,"/nrg",true))
{
    if(
nrg[playerid] == 0)
    {
        
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        
nrg[playerid] = CreateVehicle(522,Pos[0],Pos[1],Pos[2],0,-1,-1,10);
        
PutPlayerInVehicle(playerid,nrg[playerid],0);
        
SendClientMessage(playerid,0xFF641AFF,"SERVER: You have Spawned A NRG-500.");
        return 
1;
    }
    else if(
nrg[playerid] > 0)
    {
        
DestroyVehicle(nrg[playerid]);
        
nrg[playerid] = 0;
    }
    return 
1;

Reply


Messages In This Thread
spawn car/nrg with a command - by MonSterLikeHD - 27.03.2016, 08:45
Re: spawn car/nrg with a command - by Mencent - 27.03.2016, 09:14
Re: spawn car/nrg with a command - by MonSterLikeHD - 27.03.2016, 09:35
Re: spawn car/nrg with a command - by Mencent - 27.03.2016, 09:40
Re: spawn car/nrg with a command - by MonSterLikeHD - 27.03.2016, 09:47

Forum Jump:


Users browsing this thread: 1 Guest(s)