[Ajuda] Comando nao pega PPC_Trucking - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando nao pega PPC_Trucking (
/showthread.php?tid=508178)
Comando nao pega PPC_Trucking -
comanfiss - 20.04.2014
alguйm pode me ajuda PF...


pawn Код:
// Respawns the given vehicle
COMMAND:respawn(playerid, params[])
{
// Setup local variables
new vid, Msg[128];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/respawn", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "i", vid)) SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/respawn <Vehicle-id>\"");
else
{
// Check if the vehicle-id is valid
if ((vid > 0) && (vid < 2000))
{
// Check if the vehicle exists
if (AVehicleData[vid][Model] != 0)
{
// Force the vehicle to respawn
SetVehicleToRespawn(vid);
// Let the player know he respawned the vehicle
format(Msg, 128, "{808080}Voce respawnou o veiculo {FFFFFF}%i", vid);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{808080}Use Veiculos de 1 a 1999");
}
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Re: ERRO QUANDO VO COMPILAR o [FS] -
comanfiss - 20.04.2014

Re: Comando nao pega PPC_Trucking -
Fel486 - 20.04.2014
pawn Код:
COMMAND:respawn(playerid, params[])
{
// Setup local variables
new vid, Msg[128];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/respawn", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if (sscanf(params, "i", vid)) return SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/respawn <Vehicle-id>\"");
// Check if the vehicle-id is valid
if ((vid > 0) && (vid < 2000))
{
// Check if the vehicle exists
if (AVehicleData[vid][Model] != 0)
{
// Force the vehicle to respawn
SetVehicleToRespawn(vid);
// Let the player know he respawned the vehicle
format(Msg, 128, "{808080}Voce respawnou o veiculo {FFFFFF}%i", vid);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "{808080}Use Veiculos de 1 a 1999");
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "Voce deve ser, ao menos, um Admin de nivel 1");
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "Voce nao estб logado!");
// Let the server know that this was a valid command
return 1;
}
Re: Comando nao pega PPC_Trucking -
rogerioexper - 21.04.2014
TENTA USAR O MEU COMO BASE AE SУ PASSA PRA = COMMAND:respawn(playerid, params[])
PHP код:
if(strcmp(cmd, "/spawncar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1 )
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando!");
return 1;
}
if(IsPlayerInAnyVehicle(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREY, "Veiculo resetado!");
}
}
return 1;
}
Re: Comando nao pega PPC_Trucking -
comanfiss - 23.04.2014
esse comando й pra caminhoneiro
rogerioexper?