[Help] My command
#1

EDIT: I've fixed the error by myself, any mod please delete this thread.
Reply
#2

pawn Код:
CMD:helpnewbie(playerid, params[])
{
    new Float:x, Float:y, Float:z, pid, name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerPos(pid, x, y, z);
    if(sscanf(params,"u", pid)) return SendClientMessage(playerid, -1, "USAGE: /helpnewbie [playerid/PartOfName]");
    if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command !");
    if(PlayerInfo[playerid][pHelper] >= 1 && HelpMe[playerid] == 1 ) // you had do brackets here )) but it's only one!
    {
        SetPlayerPos(playerid, x, y, z);
        format(string, sizeof(string), "* You have teleported to %s !", name);
        SendClientMessage(playerid, COLOR_GRAD2, string);
        SendClientMessage(playerid, COLOR_YELLOW, "* To return where you were, type in /helpnewbie again");
    }
    else
    {
        SetPlayerPos(playerid, x, y, z);
    }
    return 1;
}
Hope this helps..

Edit: WHY do you freaking post here when you think you can fix it by yourself? WHY don't you make sure and re-read your script huh?? ... next time be sure before you post a topic .. :/

Regards,
FalconX
Reply
#3

Quote:
Originally Posted by FalconX
Посмотреть сообщение
pawn Код:
CMD:helpnewbie(playerid, params[])
{
    new Float:x, Float:y, Float:z, pid, name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerPos(pid, x, y, z);
    if(sscanf(params,"u", pid)) return SendClientMessage(playerid, -1, "USAGE: /helpnewbie [playerid/PartOfName]");
    if(PlayerInfo[playerid][pHelper] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command !");
    if(PlayerInfo[playerid][pHelper] >= 1 && HelpMe[playerid] == 1 ) // you had do brackets here )) but it's only one!
    {
        SetPlayerPos(playerid, x, y, z);
        format(string, sizeof(string), "* You have teleported to %s !", name);
        SendClientMessage(playerid, COLOR_GRAD2, string);
        SendClientMessage(playerid, COLOR_YELLOW, "* To return where you were, type in /helpnewbie again");
    }
    else
    {
        SetPlayerPos(playerid, x, y, z);
    }
    return 1;
}
Hope this helps..

Regards,
FalconX
Thanks by the way, but I've already fixed it.
Reply
#4

Is your >zcmd< include properly installed?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)