#1

How to make /drag commands?
PHP код:
COMMAND:drag(playeridparams[])
{
    new 
playerbstring[128];
    if(
PlayerLoggedIn[playerid] == true)
    {
        if(!
sscanf(params"u"playerb))
        {
            if(
IsPlayerConnected(playerb))
            {
                if(
KasutajaInfo[playerid][Grupeering] == || KasutajaInfo[playerid][Grupeering] == 9)
                {
                    
format(stringsizeof(string), "* Sind hakkati tirima %s,"playerid);
                    
SendClientMessage(playerbCOLOR_LIGHTBLUEstring);
                     
format(stringsizeof(string), "* Sa alustasid tirimist %s,"playerid);
                     
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                     
format(stringsizeof(string), "* %s alustas %s tirimist."playerid ,playerb);
                     
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                     
TogglePlayerControllable(playerid0);
                }
                else 
SCM(playeridCOLOR_GREY"Sa pole politseinik");
             }
            else 
SCM(playeridCOLOR_GREY"Sa pole serveris");
        }
        else 
SCM(playeridCOLOR_GREY"KASUTA: /tiri ID");
    }
    else 
SCM(playeridCOLOR_GREY"Sa pole sisse logitud");
    return 
1;

If i use this command then i start drag myself
Reply
#2

Shouldn't you freeze "playerb" instead of "playerid"?
pawn Код:
TogglePlayerControllable(playerid, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)