SA-MP Forums Archive
[help] Small problem - 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] Small problem (/showthread.php?tid=254414)



[help] Small problem - up2u - 10.05.2011

Код:
     if (strcmp(cmd, "/spc", true) == 0)
		{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /spc(Special Person Chat) [playerid/PartOfName] [reason]");
			return 1;
		}
		if (PlayerInfo[playerid][pAge] == 310518 )
		{
			SendClientMessage(playerid, COLOR_YELLOW, " My penis is very Tiny ";
			return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_YELLOW, " My penis is really big ";
			return 1;
			}
		}
		return 1;
 }
Whats wrong

(PS: Im actualy trying to make an person able to ajail & ban which should be possible if he got 310518 as age,
But i think i can do that if this is fixed)


Re: [help] Small problem - Cameltoe - 10.05.2011

Quote:
Originally Posted by up2u
Посмотреть сообщение
Код:
     if (strcmp(cmd, "/spc", true) == 0)
		{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /spc(Special Person Chat) [playerid/PartOfName] [reason]");
			return 1;
		}
		if (PlayerInfo[playerid][pAge] == 310518 )
		{
			SendClientMessage(playerid, COLOR_YELLOW, " My penis is very Tiny ";
			return 1;
		}
		else
		{
			SendClientMessage(playerid, COLOR_YELLOW, " My penis is really big ";
			return 1;
			}
		}
		return 1;
 }
Whats wrong

(PS: Im actualy trying to make an person able to ajail & ban which should be possible if he got 310518 as age,
But i think i can do that if this is fixed)
You should consider using Zcmd instead.


Re: [help] Small problem - up2u - 10.05.2011

Yea.. Hmm...

Well look i got this script from my friend and im trying to learn the basics,
Im trying to do that by making small commands like SendclientmessageALL

But this stuff isn't working, I would appreciate it if you make the Pawno Code for me in the way that will make it work. Than i can look whats different and make other commands based on this.


Re: [help] Small problem - Cameltoe - 10.05.2011

Quote:
Originally Posted by up2u
Посмотреть сообщение
Yea.. Hmm...

Well look i got this script from my friend and im trying to learn the basics,
Im trying to do that by making small commands like SendclientmessageALL

But this stuff isn't working, I would appreciate it if you make the Pawno Code for me in the way that will make it work. Than i can look whats different and make other commands based on this.
pawn Код:
command(test, playerid, params[])
{
     new string[128];
     format(string, sizeof(string), "Server : %s", params);
     SendClientMessageToAll(GetPlayerColor(playerid), string);
     return 1;
}
When you type /test something here, then there will be an message sent to all clients connected : Server : something here


Re: [help] Small problem - up2u - 10.05.2011

Thanks camel


Re: [help] Small problem - Cameltoe - 10.05.2011

Quote:
Originally Posted by up2u
Посмотреть сообщение
Thanks camel
Your'e welcome, tell me if you need any further advice goodluck !