sscanf "u" specifier problem
#1

Hello,

I'm having a problem with sscanf "u" specifier. I did a search before posting this and couldn't find any solutions.

So basically my problem is that I want to use any part of player name to teleport player to me, but I can only use full or first part of the name. For example - I want to use Morgan part of Dexter_Morgan name to teleport him to me, but I can only use Dexter or Dexter_Morgan. What am I doing wrong?

pawn Код:
CMD:get(playerid,params[])
{
    if ( GetPVarInt( playerid, "Level" ) < 1 )
    return SendClientMessage( playerid, -1, "Turite bыti bent "#Level1", kad galлtumлte naudotis рia komanda.");
    new targetid, Float:x, Float:y, Float:z;
    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, "Naudojimas: /get <id/dalis vardo>");
    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""RAUDONA"Юaidлjas neprisijungжs arba vardа raрлte ne nuo priekio.");
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(targetid, x, y+0.5, z+0.5);
    return 1;
}
Or isn't specifier "u" the one I need to use?

Any help is appreciated.
Reply


Messages In This Thread
[SOLVED] sscanf "u" specifier problem - by SexTourist - 31.03.2013, 18:26
Re: sscanf "u" specifier problem - by Windrush - 31.03.2013, 18:28
Re: sscanf "u" specifier problem - by SexTourist - 31.03.2013, 18:29
Re: sscanf "u" specifier problem - by Dj_maryo1993 - 31.03.2013, 18:33
Re: sscanf "u" specifier problem - by SilverKiller - 31.03.2013, 18:33
Re: sscanf "u" specifier problem - by Babul - 31.03.2013, 18:34
Re: sscanf "u" specifier problem - by [ABK]Antonio - 31.03.2013, 18:36
Re: sscanf "u" specifier problem - by SexTourist - 31.03.2013, 18:55
Re: sscanf "u" specifier problem - by Babul - 31.03.2013, 18:58
Re: sscanf "u" specifier problem - by SexTourist - 31.03.2013, 19:05

Forum Jump:


Users browsing this thread: 1 Guest(s)