if(strcmp(cmdtext,"/an",true)==0) { new pName[MAX_PLAYER_NAME]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /an [text]"); if(IsPlayerConnected(playerid)) { GetPlayerName(playerid,pName,sizeof(pName)); format(string,sizeof(string),"[ADMIN ANNOUNCE] %s: %s",pName,cmdtext[7]); SendClientMessageToAll(COLOR_BLUE,string); } return 1; } 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; } if(strcmp(cmdtext,"/ad",true)==0) { new pName[MAX_PLAYER_NAME]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /ad [message]"); if(IsPlayerConnected(playerid)) { if (GetPlayerMoney(playerid) >= 499) SendClientMessage(playerid,COLOR_RED,"You don't have 500$"); } GetPlayerName(playerid,pName,sizeof(pName)); format(string,sizeof(string),"Advertisement: %s by [%s]",cmdtext,pName[7]); SendClientMessageToAll(COLOR_ORANGE,string); GivePlayerMoney(playerid, -500); SendClientMessage(playerid,COLOR_ORANGE,"Your AD costed $500"); return 1; }
if(strcmp(cmdtext,"/an",true)==0)
{
new pName[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /an [text]");
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"[ADMIN ANNOUNCE] %s: %s",pName,cmdtext[7]);
SendClientMessageToAll(COLOR_BLUE,string);
return 1;
}
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;
}
if(strcmp(cmdtext,"/ad",true)==0)
{
new pName[MAX_PLAYER_NAME];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /ad [message]");
if(IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 499)
SendClientMessage(playerid,COLOR_RED,"You don't have 500$");
}
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Advertisement: %s by [%s]",cmdtext,pName[7]);
SendClientMessageToAll(COLOR_ORANGE,string);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid,COLOR_ORANGE,"Your AD costed $500");
return 1;
}
Originally Posted by [GTA
Deadly_Evil ]
pawn Код:
|
new idx;
new tmp[256];
if(!strcmp(cmd, "/me",true) || !strcmp(cmd, "/mymessage",true))
{
new dir[256];
dir = strtok(cmdtext, idx);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(dir))
{
SendClientMessage(playerid,COLOR_PINK,"[USAGE]> /me [Message/Action]");
return 1;
}
dir = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s(%d) Says: %s", sendername, playerid, tmp);
SendClientMessageToAll(COLOR_RED,string);
print(string);
return 1;
}
if(!strcmp(cmd, "/ad",true) || !strcmp(cmd, "/advertise",true))
{
new dir[256];
dir = strtok(cmdtext, idx);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(dir))
{
SendClientMessage(playerid,COLOR_PINK,"[USAGE]> /ad [Advertisement Name]");
return 1;
}
if (GetPlayerMoney(playerid) >= 499)
SendClientMessage(playerid,COLOR_RED,"You don't have 500$");
}
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"Advertisement: %s by [%s]",cmdtext,pName[7]);
SendClientMessageToAll(COLOR_ORANGE,string);
GivePlayerMoney(playerid, -500);
print(string);
return 1;
}
if(!strcmp(cmd, "/an",true) || !strcmp(cmd, "/adminmsg",true))
{
new dir[256];
dir = strtok(cmdtext, idx);
strmid(tmp, cmdtext, 4, strlen(cmdtext));
if(!strlen(dir))
{
SendClientMessage(playerid,COLOR_PINK,"[USAGE]> /an [Message]");
return 1;
}
dir = strtok(cmdtext, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[ADMIN ANNOUNCE] %s(%d): %s", sendername, playerid, tmp);
SendClientMessageToAll(COLOR_RED,string);
print(string);
return 1;
}
Originally Posted by [GTA
Deadly_Evil ]
pawn Код:
|