12.09.2012, 00:28
pawn Код:
zcmd
CMD:trafico(playerid)
{
if (IsPlayerInAnyVehicle(playerid))
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID,2177.8599,-980.9830,64.4688);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
new string[45];
format(string, sizeof(string), " %s Foi Para o trafico Comando /trafico ", name);
SendClientMessageToAll(-1, string);
SetPlayerInterior(playerid, 0);
}else {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
SetPlayerPos(playerid,2177.8599,-980.9830,64.4688);
SetPlayerInterior(playerid, 0);
new string[45];
format(string, sizeof(string), " %s Foi Para o trafico Comando /trafico ", name);
SendClientMessageToAll(-1, string);
}
return 1;
}
pawn Код:
strcmp
if (strcmp("/trafico", cmdtext, true, 8) == 0)
{
if (IsPlayerInAnyVehicle(playerid))
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID,2177.8599,-980.9830,64.4688);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
new string[45];
format(string, sizeof(string), " %s Foi Para o trafico Comando /trafico ", name);
SendClientMessageToAll(-1, string);
SetPlayerInterior(playerid, 0);
}else {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
SetPlayerPos(playerid,2177.8599,-980.9830,64.4688);
SetPlayerInterior(playerid, 0);
new string[45];
format(string, sizeof(string), " %s Foi Para o trafico Comando /trafico ", name);
SendClientMessageToAll(-1, string);
}
return 1;
}