12.08.2009, 02:29
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.
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; }