07.07.2013, 13:39
Olб, bom dia!
FelipeAMC, se nгo me engano й strcmp...
Vlw!
FelipeAMC, se nгo me engano й strcmp...
pawn Код:
if(strcmp(cmd, "/matar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFFF, "USE: /matar [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >=1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerHealth(playa, 0.0);
SetPlayerVirtualWorld(playa,0);
format(string, 128, "AdmCmd: %s matou %s",sendername, giveplayer);
ABroadCast(0xC2CA7FFF,string,1);
}
}
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, " Vocк nгo pode utilizar esse comando!");
}
}
return 1;
}