command(respawn, playerid, params[])
{
if( ASystem[playerid][Admin] == true ) { SendClientMessage(playerid, Cinza, "Vocк nгo й um administrador"); }
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsVehicleOccupied(i))
{
SetVehicleToRespawn(i);
}
}
new Str[80]; format(Str, sizeof(Str), "%s Respanou todos os veнculos desocupados", pNome(playerid));
SendClientMessageToAll(Roxo, Str);
return 1;
}
stock IsVehicleOccupied(vehicleid) // Retorna a 1 se hб alguйm no veнculo
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetPlayerVehicleID(i) == vehicleid)
{
return 1;
}
else
{
return 0;
}
}
}
}
C:\Users\Lucas\Desktop\samp03z_svr_R1_win32\Sistemas\Sistema de administraзгo.pwn(305) : warning 209: function "IsVehicleOccupied" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
stock IsVehicleOccupied(vehicleid) // Retorna a 1 se hб alguйm no veнculo
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetPlayerVehicleID(i) == vehicleid)
{
return 1;
}
else
{
return 0;
}
}
}
return 1;
}
Olб Lucas ,
atй onde eu sei ( so iniciante tbm ) olha scripter's avanзados jб me falarao que o Warning nгo " AFETA " o GameMode й apenas celulas que alguma linha nгo pode estar alinhada . ou sejб isso nгo interfere nada . Warning = Celulas do gm/fs . ![]() Skype : MathHostMH FB ; www.********.com/MatheusSiqueiraOficial |
stock IsVehicleOccupied(vehicleid) // Retorna a 1 se hб alguйm no veнculo 0 caso esteja sem ninguem
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerInAnyVehicle(i) && GetPlayerVehicleID(i) == vehicleid)
return 1;
return 0;
}