Help cmd
#1

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 ?
Reply
#2

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.
Reply
#3

have u got any start of the cmd?
Reply
#4

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;
}
Reply
#5

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

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
Reply
#7

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.
Reply
#8

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.
Reply
#9

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"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)