31.07.2015, 18:29
Hey guys!
I am creating my own admin filterscript with sscanf,zcmd and mysql.
My problem:
I have a "Respawn Cars" command (/respawncars). And when I type it it respawns all the vehicles but the player's cars doesnt respawn. It stays there. How to fix it?
Code:
I am creating my own admin filterscript with sscanf,zcmd and mysql.
My problem:
I have a "Respawn Cars" command (/respawncars). And when I type it it respawns all the vehicles but the player's cars doesnt respawn. It stays there. How to fix it?
Code:
PHP код:
CMD:respawncars(playerid,params[]){
if(P_DATA[playerid][alevel] < 4)return SendClientMessage(playerid,-1,"{FFFFFF}You must be{FF0000} Level 4{FFFFFF} to use this command.");
for(new v=0; v<MAX_VEHICLES; v++){
SetVehicleToRespawn(v);
}
new name[MAX_PLAYER_NAME],str[256];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),"{FFFF00}%s{FFFFFF} has respawned all vehicles!",name);
SendClientMessageToAll(-1,str);
return 1;
}