Car Respawn Command
#1

if someone looking for respawnallunusedcars here i will give you this
Код:
if(strcmp(cmdtext, "/respawnallcars", true) == 0){
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
        new vh=CreateVehicle(400,0.0,0.0,0.0,0.0,-1,-1,-1);
  	DestroyVehicle(vh);
  	new p[MAX_VEHICLES];
  	for(new v = 0; v < vh; v++){
  	p[v]=0;
  	for(new i = 0; i < GetMaxPlayers(); i++){
	if(IsPlayerInVehicle(i,v)) p[v]=1;
}
	if(p[v]==0) SetVehicleToRespawn(v);
}
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"Admin %s Has Respawned all Unused Cars!",pName);
    SendClientMessageToAll(COLOR_LIGHTGREEN,string);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)