SA-MP Forums Archive
Help 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help cmd (/showthread.php?tid=81743)



Help cmd - tony_fitto - 13.06.2009

Hey can some one help me i need help with my cmd, i want it to only work by the name so if my name is Exempel_Exempel i want it to only work for that guy as use that nick name how can i fix that ?


Re: Help cmd - efeX - 13.06.2009

I'm not sure if you're asking us to make one or help your current command, if the latter then we don't have any code to even look at.


Re: Help cmd - HuRRiCaNe - 13.06.2009

have u got any start of the cmd?


Re: Help cmd - tony_fitto - 16.06.2009

Quote:
Originally Posted by BiG_Sm0k3
have u got any start of the cmd?
I have the code but the only thing i need help with is so only One player can use the cmd and the cmd can only bee used by nickname

Код:
if (strcmp(cmdtext, "/blommor1", true) == 0)
{
	MoveObject(blomma1, 884.509,-1077.6,13.4562,2.5);
	MoveObject(blomma2, 884.509,-1077.2,13.4562,2.5);
	MoveObject(blomma3, 884.509,-1077.4,13.4562,2.5);
	return 1;
}
if (strcmp(cmdtext, "/blommor2", true) == 0)
{
	MoveObject(blomma1, 884.509,-1077.6,23.4562,2.5);
	MoveObject(blomma2, 884.509,-1077.2,23.4562,2.5);
	MoveObject(blomma3, 884.509,-1077.4,23.4562,2.5);
return 1;
}



Re: Help cmd - MenaceX^ - 16.06.2009

Do permission by their names.
if(!strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");


Re: Help cmd - DracoBlue - 16.06.2009

Quote:
Originally Posted by MenaceX^
Do permission by their names.
if(!strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");
Remove the !
if(strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");

- Draco



Re: Help cmd - MenaceX^ - 16.06.2009

Quote:
Originally Posted by DracoBlue
Quote:
Originally Posted by MenaceX^
Do permission by their names.
if(!strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");
Remove the !
if(strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");

- Draco
Yeah my bad, I'm used to write ! on strcmp since I write alot of commands, and I usualy use strcmp for commands only.


Re: Help cmd - DracoBlue - 16.06.2009

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by DracoBlue
Quote:
Originally Posted by MenaceX^
Do permission by their names.
if(!strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");
Remove the !
if(strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");

- Draco
Yeah my bad, I'm used to write ! on strcmp since I write alot of commands, and I usualy use strcmp for commands only.
Just wanted to be sure, it's right

- Draco

PS: GZ to 2999 posts.


Re: Help cmd - tony_fitto - 16.06.2009

Quote:
Originally Posted by DracoBlue
Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by DracoBlue
Quote:
Originally Posted by MenaceX^
Do permission by their names.
if(!strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");
Remove the !
if(strcmp(playername,"Name",true)) return SendClientMessage(playerid,color,"Not Authorized.");

- Draco
Yeah my bad, I'm used to write ! on strcmp since I write alot of commands, and I usualy use strcmp for commands only.
Just wanted to be sure, it's right

- Draco

PS: GZ to 2999 posts.
Damn i get an error i dont know why and what i can do about it help please

Код:
error 017: undefined symbol "playername"