SAMP Command Returns Unkown Command
#1

Код:
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?
Reply
#2

Have you added

pawn Код:
dcmd(gethere, 7, cmdtext);
Under OnPlayerCommandText?
Reply
#3

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Have you added

pawn Код:
dcmd(gethere, 7, cmdtext);
Under OnPlayerCommandText?
Of Course
Reply
#4

Make sure that it's not inside any if statements. Put it directly under OnPlayerCommandText.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)