31.03.2013, 18:26
(
Последний раз редактировалось SexTourist; 31.03.2013 в 19:06.
)
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?
Or isn't specifier "u" the one I need to use?
Any help is appreciated.
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;
}
Any help is appreciated.