SA-MP Forums Archive
[Help] My 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)
+--- Thread: [Help] My command (/showthread.php?tid=366799)



[Help] My command - JustinAn - 07.08.2012

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


Re: [Help] My command - FalconX - 07.08.2012

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


Re: [Help] My command - JustinAn - 07.08.2012

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.


Re: [Help] My command - ThePhenix - 07.08.2012

Is your >zcmd< include properly installed?