SA-MP Forums Archive
help :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help :D (/showthread.php?tid=198555)



help :D - MestreKiller - 12.12.2010

its strange i cant figure it out what happens
like if i do /kick 1 hi there
it will appear ex:
AdmCmd: john has been kicked [reason: hjohn] so the first letter of the reason + his name
weired
pawn Код:
dcmd_kick(playerid,params[])
{
    new id,pName[MAX_PLAYER_NAME],reason,string[128];
    if(PInfo[playerid][Level] < 3) return 0;
    if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,orange,"USAGE: /kick [playerid][reason]");
    GetPlayerName(id,pName,sizeof(pName));
    format(string,sizeof(string),"AdmCmd: %s has been kicked [reason: %s]",pName,reason);
    SendClientMessageToAll(cream,string);
    Kick(id);
    return 1;
}



Re: help :D - armyoftwo - 12.12.2010

reason must be a string
Код:
dcmd_kick(playerid,params[])
{
    new id,pName[MAX_PLAYER_NAME],reason[128],string[128];
    if(PInfo[playerid][Level] < 3) return 0;
    if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,orange,"USAGE: /kick [playerid][reason]");
    GetPlayerName(id,pName,sizeof(pName));
    format(string,sizeof(string),"AdmCmd: %s has been kicked [reason: %s]",pName,reason);
    SendClientMessageToAll(cream,string);
    Kick(id);
    return 1;
}



Re: help :D - MestreKiller - 12.12.2010

Quote:
Originally Posted by armyoftwo
Посмотреть сообщение
reason must be a string
Код:
dcmd_kick(playerid,params[])
{
    new id,pName[MAX_PLAYER_NAME],reason[128],string[128];
    if(PInfo[playerid][Level] < 3) return 0;
    if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,orange,"USAGE: /kick [playerid][reason]");
    GetPlayerName(id,pName,sizeof(pName));
    format(string,sizeof(string),"AdmCmd: %s has been kicked [reason: %s]",pName,reason);
    SendClientMessageToAll(cream,string);
    Kick(id);
    return 1;
}
i see your point, but you dont mean string, you mean a size array


Re: help :D - armyoftwo - 12.12.2010

Quote:
Originally Posted by [OC]MestreKiller
Посмотреть сообщение
i see your point, but you dont mean string, you mean a size array
My native language isn't English so i kinda suck at it


Re: help :D - MestreKiller - 12.12.2010

Quote:
Originally Posted by armyoftwo
Посмотреть сообщение
My native language isn't English so i kinda suck at it
its ok my native english isnt too, but i speak 4 languages so xD