Sscanf problem[+rep] -
The-.-WariOr! - 28.10.2011
hi im having problem with Sscanf
i have this
pawn Код:
COMMAND:gotop(playerid, params[])
{
new gotopid;if(sscanf(params,"u", gotopid)) return SendClientMessage(playerid,0xFF0000FF,"Usage: "GREEN"/gotop [id]");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(gotopid,X,Y,Z);
SetPlayerPos(playerid, X+1, Y+1, Z);
return 1;
]
the problem is when theres 5 players on server then lets say i type [/gotop 4] and it will teleport me to player
0
how to fix this ?
Re: Sscanf problem[+rep] -
Jason_Thunde - 28.10.2011
What samp version are you using
Re: Sscanf problem[+rep] -
GangsTa_ - 28.10.2011
Why don't you copy the /goto command from other gamemodes? Instead of waiting for an answer you could do that fast.
Re: Sscanf problem[+rep] -
[MWR]Blood - 28.10.2011
Are you using 0.3d? Also, do it on a new line:
pawn Код:
COMMAND:gotop(playerid, params[])
{
new gotopid;
if(sscanf(params,"u", gotopid)) return SendClientMessage(playerid,0xFF0000FF,"Usage: "GREEN"/gotop [id]");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(gotopid,X,Y,Z);
SetPlayerPos(gotopid, X+1, Y+1, Z);
return 1;
}
Re: Sscanf problem[+rep] -
The-.-WariOr! - 28.10.2011
Quote:
Originally Posted by Jason_Thunde
What samp version are you using
|
0.3c R5
Quote:
Originally Posted by GangsTa_
Why don't you copy the /goto command from other gamemodes? Instead of waiting for an answer you could do that fast. 
|
becouse i really need this one to keep it simple and also fix some other cmds becouse they have the same problem
Re: Sscanf problem[+rep] -
System64 - 28.10.2011
must changed this
SetPlayerPos(gotopid, X+1, Y+1, Z);
to this
SetPlayerPos(playerid, X+1, Y+1, Z);
Re: Sscanf problem[+rep] -
The-.-WariOr! - 28.10.2011
Quote:
Originally Posted by System64
must changed this
SetPlayerPos(gotopid, X+1, Y+1, Z);
to this
SetPlayerPos(playerid, X+1, Y+1, Z);
|
is allredy like that i just copyed it wrong from mt script sorry
Re: Sscanf problem[+rep] -
LiamM - 28.10.2011
I just all of a sudden got this problem too, I just made a post. It was working a few days ago!
Re: Sscanf problem[+rep] -
Buzzbomb - 28.10.2011
pawn Код:
COMMAND:gotop(playerid, params[])
{
new gotopid;
if(sscanf(params)) return SendClientMessage(playerid,0xFF0000FF,"Usage: "GREEN"/gotop [id]");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(gotopid,X,Y,Z);
SetPlayerPos(gotopid, X+1, Y+1, Z);
return 1;
}
In mine i dont have u I just used the basic
if(sscanf(params)) this aint my code but looks the same... but mines bigger i have formats to show player i teleported to them
Never did experience what your getting yet..
Re: Sscanf problem[+rep] -
wumpyc - 28.10.2011
maybe make a loop?