SAMP Command Returns Unkown Command - 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: SAMP Command Returns Unkown Command (
/showthread.php?tid=270111)
SAMP Command Returns Unkown Command -
Shockey HD - 19.07.2011
Код:
dcmd_gethere(playerid,params[])
{
new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
new tmp[256], Index;
tmp = strtok(params,Index), id = strval(tmp);
GetPlayerName(id,on,sizeof(on));
GetPlayerName(playerid,n,sizeof(n));
if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level 1 Admin to use this command!");
if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /get <ID> ");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,GREY,"Invalid ID");
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(id, x, y, z+3);
return 1;
}
Whats wrong?
Re: SAMP Command Returns Unkown Command -
[HiC]TheKiller - 19.07.2011
Have you added
pawn Код:
dcmd(gethere, 7, cmdtext);
Under OnPlayerCommandText?
Re: SAMP Command Returns Unkown Command -
Shockey HD - 19.07.2011
Quote:
Originally Posted by [HiC]TheKiller
Have you added
pawn Код:
dcmd(gethere, 7, cmdtext);
Under OnPlayerCommandText?
|
Of Course
Re: SAMP Command Returns Unkown Command -
[HiC]TheKiller - 19.07.2011
Make sure that it's not inside any if statements. Put it directly under OnPlayerCommandText.