Gun switching /me commands - 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: Gun switching /me commands (
/showthread.php?tid=144173)
Gun switching /me commands -
venturasrp - 25.04.2010
I want to make something where when you switch guns, it says Jacob_Venturas pulls his desert eagle from his holster. This applies for all guns. Can someone please give me an example, perferrably working.
Re: Gun switching /me commands -
Las Venturas CNR - 25.04.2010
Here's the /me command:
pawn Код:
if(strcmp(cmdtext,"/me",true)==0)
{
new pName[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /me [action]");
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"%s %s",pName,cmdtext[7]);
SendClientMessageToAll(COLOR_WHITE,string);
}
return 1;
}
Just make "COLOR_WHITE" to the color you want everyone to see it in.