SA-MP Forums Archive
Nicks please help me - 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: Nicks please help me (/showthread.php?tid=337572)



Nicks please help me - Nicks - 26.04.2012

In my Script NGRP i have Bugg IDS Bugged When i do /gotoid 3 i goto id 0 from id 0 to id 2 work 2 and more Bugged If i do /gotoid 4 i goto id 0 Please if some one know Give me his Skype and i will add Him to give Him SCript To fix and give me it back .


Re: Nicks please help me - Ballu Miaa - 27.04.2012

Your command using strcmp.
pawn Код:
if(strcmp(cmd, "/gotoid", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gotoid [Playerid/PartOfName]");
                return 1;
            }
            new Float:plocx,Float:plocy,Float:plocz;
            new plo;
            plo = ReturnUser(tmp);
            if (IsPlayerConnected(plo))
            {
                if(plo != INVALID_PLAYER_ID)
                {
                    if (PlayerInfo[playerid][pAdmin] >= 1) // Edit this line according to your admin variable
                    {
                        GetPlayerPos(plo, plocx, plocy, plocz);
                        SetPlayerInterior(playerid, GetPlayerInterior(plo));
                        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
                        if (GetPlayerState(playerid) == 2)
                        {
                            new tmpcar = GetPlayerVehicleID(playerid);
                            SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                            TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                        }
                        else
                        {
                            SetPlayerPos(playerid,plocx,plocy+2, plocz);
                        }
                        SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported");
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GRAD1, "You are not authorised to use that command.");
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "   %d is not an active player.", plo);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
Your command using ZCMD with Sscanf.

pawn Код:
COMMAND:gotoid(playerid, params[])
    {
        if(IsPlayerConnected(playerid))
        {
            new plo;
            if(sscanf(params, "u",plo)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto [Playerid/PartOfName]");
            new Float:plocx,Float:plocy,Float:plocz;
            if (IsPlayerConnected(plo))
            {
                if(plo != INVALID_PLAYER_ID)
                {
                    if (PlayerInfo[playerid][pAdmin] >= 1) // Edit this line according to your admin variable
                    {
                        GetPlayerPos(plo, plocx, plocy, plocz);
                        SetPlayerInterior(playerid, GetPlayerInterior(plo));
                        SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(plo));
                        if (GetPlayerState(playerid) == 2)
                        {
                            new tmpcar = GetPlayerVehicleID(playerid);
                            SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
                            TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
                        }
                        else
                        {
                            SetPlayerPos(playerid,plocx,plocy+2, plocz);
                        }
                        SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported");
                    }
                    else return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorised to use that command.");
                }
            }
            else return SendClientMessage(playerid, COLOR_GRAD1, "[CW:WW3] That is not an active player");
        }
        return 1;
    }



Re: Nicks please help me - ReneG - 27.04.2012

Stop using the NGRP script.


Re: Nicks please help me - _Swift_ - 27.04.2012

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Stop using the NGRP script.
+1


Custom Scripts <3


Re: Nicks please help me - Ballu Miaa - 27.04.2012

Let them use if they want to. They arent taking anything from us. Their wish.


Re: Nicks please help me - RollTi - 27.04.2012

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Let them use if they want to. They arent taking anything from us. Their wish.
He can use it but his server will be in the blacklisted


Re: Nicks please help me - Ballu Miaa - 27.04.2012

Quote:
Originally Posted by RollTi
Посмотреть сообщение
He can use it but his server will be in the blacklisted
Its his problem , isnt it? loolx