Vrespawn
#1

I can't destroy all cars from the map with this. Why?

PHP код:
CMD:vrespawnplayeridparams[ ] )
{
    if( 
PlayerInfo[playerid][pAdmin] < ) return 0;
       for( new 
i=0MAX_PLAYERSi++ )
       
    if(
SpawnedVehicles[playerid] == 1DestroyVehicle(SpawnedVehicles[i]);
    
GetPlayerNameplayeridNamsizeof Nam );
    
formatmystringsizeof mystring"Admin-Log: %s respawned all cars."Nam);
    
SendAdminMessageCOLOR_LIMEmystring );
    
SendClientMessageToAll(COLOR_CYAN"All vehicles are respawned!");
    return 
1;
}
CMD:car(playeridparams[])
{
       
//unnecessary code removed
    
new Float:X,Float:Y,Float:Z;    new Float:Angle,int1;    new LVehicleID GetPlayerVehicleID(playerid);
    
GetPlayerPos(playeridX,Y,Z);    GetPlayerFacingAngle(playerid,Angle);    int1 GetPlayerInterior(playerid);
    
SpawnedVehicles[playerid] = CreateVehicle(carX,Y,ZAnglecolour1colour2, -1); LinkVehicleToInterior(LVehicleID,int1);    PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
    
format(stringsizeof(string), "SYSTEM:{FFFFFF} You spawned a %s"VehicleNames[car-400]);
    return 
SendClientMessage(playeridCOLOR_REDstring);

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)