CMD:dice(playerid,params[])
{
new rand = random(12);
new sendername[MAX_PLAYER_NAME], message[128];
format(message, sizeof(message), "%s(%d) tries his luck and throws the dice, The dice landed on the number %d",sendername,playerid,rand);
ProxDetector(30.0, playerid, message,COLOR_LAWNGREEN,COLOR_LAWNGREEN,COLOR_LAWNGREEN,COLOR_LAWNGREEN,COLOR_LAWNGREEN);
return 1;
}
CMD:ad(playerid,params[])
{
new sendername[MAX_PLAYER_NAME], string[28];
format(string, sizeof(string),"ADVERTIESMENT: %s, contact %s (ID:%d)",params,sendername,playerid);
SendClientMessageToAll(COLOR_ORANGE,string);
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
CMD:ad(playerid,params[])
{
new sendername[MAX_PLAYER_NAME], string[28];
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);//<<<<<
format(string, sizeof(string),"ADVERTIESMENT: %s, contact %s (ID:%d)",params,sendername,playerid);
SendClientMessageToAll(COLOR_ORANGE,string);
return 1;
}
CMD:dice(playerid,params[])
{
new rand = random(12);
new sendername[MAX_PLAYER_NAME], message[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(message, sizeof(message), "%s(%d) tries his luck and throws the dice, The dice landed on the number %d",sendername,playerid,rand);
ProxDetector(30.0, playerid, message,COLOR_LAWNGREEN,COLOR_LAWNGREEN,COLOR_LAWNGREEN,COLOR_LAWNGREEN,COLOR_LAWNGREEN);
return 1;
}
CMD:ad(playerid,params[])
{
new sendername[MAX_PLAYER_NAME], string[64], ad[64];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params,"s[64]", ad)) return SendClientMessage(playerid, FFFFFF, "Usage: /ad [text]");
format(string, sizeof(string),"ADVERTISEMENT: %s, contact %s (ID:%d)", ad, sendername, playerid);
SendClientMessageToAll(COLOR_ORANGE, string);
return 1;
}
Obs. Your string array is too short, will not print all characters.
|
CMD:ad(playerid,params[])
{
new sendername[MAX_PLAYER_NAME], string[144];// <<<<
GetPlayerName(playerid, sendername, MAX_PLAYER_NAME);
format(string, sizeof(string),"ADVERTIESMENT: %s, contact %s (ID:%d)",params,sendername,playerid);
SendClientMessageToAll(COLOR_ORANGE,string);
return 1;
}
CMD:ad(playerid,params[])
{
new sendername[MAX_PLAYER_NAME], string[64], ad[144];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params,"s[64]", ad)) return SendClientMessage(playerid, FFFFFF, "Usage: /ad [text]");
format(string, sizeof(string),"ADVERTISEMENT: %s, contact %s (ID:%d)", ad, sendername, playerid);
SendClientMessageToAll(COLOR_ORANGE, string);
return 1;
}
CMD:ad(playerid,params[])
{
new sendername[MAX_PLAYER_NAME], string[128], ad[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params,"s[64]", ad)) return SendClientMessage(playerid, FFFFFF, "Usage: /ad [text]");
format(string, sizeof(string),"ADVERTISEMENT: %s, contact %s (ID:%d)", ad, sendername, playerid);
SendClientMessageToAll(COLOR_ORANGE, string);
return 1;
}