- 0
Problema /RespawnAllCars
-
Similar Content
-
- 2 answers
- 615 views
-
Problema turf
By Soryn.,
- 3 answers
- 402 views
-
- 0 replies
- 142 views
-
- 2 replies
- 331 views
-
- 1 reply
- 203 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
wifi123
Am si eu o problema cu , comanda /respawnallcars , daca pun o masina langa icon-ul de la o casa si dau /respawnallcars , se incurca textdraw-urile , adica masina ia textdraw-ul cu owner , pret...etc de la casa
[pawn]dcmd_rac(playerid, params[]){
#pragma unused params
if(PlayerInfo[playerid][Level] <= 12){
SendClientMessage(playerid, red, "ERROR:You can't use this command!");
}
else
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "{FFFFFF}Owner {0049FF}%s {FFFFFF}has respawned all the unused cars", str);
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsVehicleOccupied(i) == 0)
{
SetVehicleToRespawn(i);
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
SendClientMessage(i, red, str);
}
}
}
return 1;
}[/pawn]
[pawn]stock IsVehicleOccupied(vehicleid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
return 1;
return 0;
}[/pawn]
Link to comment
Share on other sites
1 answer to this question
Recommended Posts