05.07.2012, 20:07
Try this code.
pawn Код:
case 367:
{
if(response)
{
new sms[50],ZaidejoVardas[24], Teis = StrFind(ZaidejoVardas);
if(sscanf(inputtext, "s[24]s[50]",ZaidejoVardas,sms)) return SendClientMessage(playerid, 0xFF0000AA, "Insert name and reason");
if(Teis == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "We can't find this player..");
if(IsPlayerNPC(Teis)) return SendClientMessage(playerid, 0xFF0000AA, "We can't find this player.");
new zigas[250];
format(zigas,sizeof(zigas),"Player name is %s, reason: %s",GetName(Teis),sms)//GetName is my own function. It returns player name.
SendClientMessage(playerid,-1,zigas);
}
}
case 368:
{
if(response)
{
new ZaidejoVardas[24], laiks;
if(sscanf(inputtext, "s[24]ds[50]",ZaidejoVardas,laiks,sms)) return SendClientMessage(playerid, 0xFF0000AA, "Insert name, time(seconds) and reason");
if(Teis == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "We can't find this player..");
if(IsPlayerNPC(Teis)) return SendClientMessage(playerid, 0xFF0000AA, "We can't find this player.");
new zigas[250];
format(zigas,sizeof(zigas),"You muted %s, for %d seconds, reason: %s",GetName(Teis),laiks,sms)//GetName is my own function. It returns player name.
SendClientMessage(playerid,-1,zigas);
}
}