pawn Код:
if(strcmp("/carrobomba", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pMember] != 22 || PlayerInfo[playerid][pMember] != 22) return SendClientMessage(playerid, -1, "Vocк nгo й da AlQaeda!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб em um carro.");
new Float:X, Float:Y, Float:Z;
new Veiculo = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid, X, Y, Z);
SetVehicleHealth(Veiculo, -100.0);
CreateExplosion(X, Y, Z, 8, 1.0);
new string[100];
format(string, sizeof(string), "%s Realizou um carro-bomba.", NomeEx(playerid));
SendClientMessageToAll(-1, string);
return 1;
}
if(strcmp("/homembomba", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pMember] != 22 || PlayerInfo[playerid][pMember] != 22) return SendClientMessage(playerid, -1, "Vocк nгo й da AlQaeda!");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateExplosion(X, Y, Z, 9, 15.0);
new string[100];
format(string, sizeof(string), "%s Realizou um homem-bomba.", NomeEx(playerid));
SendClientMessageToAll(-1, string);
return 1;
}
stock NomeEx(playerid)
{
new STRING[MAX_PLAYER_NAME];
GetPlayerName(playerid, STRING, sizeof(STRING));
return STRING;
}
Ou....
pawn Код:
CMD:carrobomba(playerid, params[])
{
if(PlayerInfo[playerid][pMember] != 22 || PlayerInfo[playerid][pMember] != 22) return SendClientMessage(playerid, -1, "Vocк nгo й da AlQaeda!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб em um carro.");
new Float:X, Float:Y, Float:Z;
new Veiculo = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid, X, Y, Z);
SetVehicleHealth(Veiculo, -100.0);
CreateExplosion(X, Y, Z, 8, 1.0);
new string[100];
format(string, sizeof(string), "%s Realizou um carro-bomba.", NomeEx(playerid));
SendClientMessageToAll(-1, string);
return 1;
}
CMD:homembomba(playerid, params[])
{
if(PlayerInfo[playerid][pMember] != 22 || PlayerInfo[playerid][pMember] != 22) return SendClientMessage(playerid, -1, "Vocк nгo й da AlQaeda!");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateExplosion(X, Y, Z, 9, 15.0);
new string[100];
format(string, sizeof(string), "%s Realizou um homem-bomba.", NomeEx(playerid));
SendClientMessageToAll(-1, string);
return 1;
}
stock NomeEx(playerid)
{
new STRING[MAX_PLAYER_NAME];
GetPlayerName(playerid, STRING, sizeof(STRING));
return STRING;
}