Some RP scripting help. - 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: Some RP scripting help. (
/showthread.php?tid=91047)
Some RP scripting help. -
retart441 - 12.08.2009
Hey for anyone who can script pretty good RP servers, I need some help scripting in /do.
When a player does /do, I want it to come up something like this.
If typed like /do, A clilent message comes up saying /do [Text]
Then if there is text After the command I want it to come up like,
Their is a burning cigar on the floor(( Players Name ))
Here is what I came up with.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/do", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /do [Text]");
return 1;
}
format(string, sizeof(string), "* %s %s", sendername, result);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
printf("%s", string);
}
return 1;
}
return 0;
}