SA-MP Forums Archive
Help me /go cmd - 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: Help me /go cmd (/showthread.php?tid=647230)



Help me /go cmd - Osamakurdi - 01.01.2018

im creating /go posx posy posz
but i have some proplames !
When i Write For Example:
/go 1959.595947 1352.792846 9.257812
its set me another place


This is Code:
Код:
CMD:go(playerid, params[])
{
	new bet;
	if(sscanf(params, "u", bet)) return SCM(playerid, -1, "USAGE:/go[floatx,floaty,floatz].");
	new Float:posx, Float:posy, Float:posz;
	GetPlayerPos(playerid, posx, posy, posz);
	SetPlayerPos(playerid,posx, posy, posz);
	new string [128];
	format(string, sizeof(string), "You Have Been Send To Your Choosen Location.");
	SCM(playerid, -1, string);
	return 1;

}



Re: Help me /go cmd - JesterlJoker - 01.01.2018

To this
PHP код:
CMD:go(playeridparams[])
{
    new 
Float:posxFloat:posyFloat:posz;
    if(
sscanf(params"fff"posxposyposz)) return SCM(playerid, -1"USAGE:/go[floatx,floaty,floatz].");
    
SetPlayerPos(playerid,posxposyposz);
    
SCM(playerid, -1"You Have Been Send To Your Choosen Location.");
    return 
1;




Re: Help me /go cmd - Osamakurdi - 01.01.2018

Quote:
Originally Posted by JesterlJoker
Посмотреть сообщение
To this
PHP код:
CMD:go(playeridparams[])
{
    new 
Float:posxFloat:posyFloat:posz;
    if(
sscanf(params"fff"posxposyposz)) return SCM(playerid, -1"USAGE:/go[floatx,floaty,floatz].");
    
SetPlayerPos(playerid,posxposyposz);
    
SCM(playerid, -1"You Have Been Send To Your Choosen Location.");
    return 
1;

It Didnt Work IM Still at my pos its dont TP ME


Re: Help me /go cmd - RogueDrifter - 01.01.2018

PHP код:
CMD:gotoxyz(playeridparams[])
{
    new 
xyz;
    if(
sscanf(params"iii"xyz)) return SendClientMessage(playerid0xFF0000FF"Usage: /goto [x] [y] [z]");
    
SetPlayerPos(playeridxyz);
    return 
1;

this works for me


Re: Help me /go cmd - Osamakurdi - 01.01.2018

Thanks All :*