SA-MP Forums Archive
Tried Everything, I would like some 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)
+--- Thread: Tried Everything, I would like some help. (/showthread.php?tid=492287)



Tried Everything, I would like some help. - GrassHopper101 - 03.02.2014

What I want to do is have the server send out random messages to the players on the server, see now, I already know how to do that but my problem is, its a %s has killed %s type of deal, and I can't figure out how to properly make it say %s has killed %s, or randomly say %s has murdered %s, Sort of like sending random strings to all players, get what I am saying?


Re: Tried Everything, I would like some help. - Mr.Faqahat - 03.02.2014

Maybe you need to be more precise. We are not able to understand your Point.
I guess you are having a Problem With String ?


Re: Tried Everything, I would like some help. - Raza2013 - 03.02.2014

if you're missing some text so use this
pawn Код:
string[128]



Re: Tried Everything, I would like some help. - GrassHopper101 - 03.02.2014

public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid,green,"You died.");
GivePlayerMoney(killerid,1000);
GivePlayerMoney(playerid,-100);


new playername[24], killername[24];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(killerid, killername, sizeof(killername));

new string[128];
format(string, sizeof(string), "%s killed %s", killername, playername);

new string2[128];
format(string2, sizeof(string2), "%s has murdered %s", killername, playername);


Now I can't figure out how to send a random string to all players. I want it to sendrandommessage either string or string2



return 1;
}