SA-MP Forums Archive
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: Help (/showthread.php?tid=599348)



Help - Champagne - 24.01.2016

Alright i want to understand some variables, I am using strcmp, I am scripting a DM server and i want to know how i can make it so it says "%s Just Got Dropped" but i never defined %s.

So what do i type for new string[] or whatever?


Re: Help - Trucido - 24.01.2016

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
 
    format(string, sizeof(string), "%s got dropped.", name);
    // whatever u want
     SendClientMessageToAll(-1, string);

   // ....
}



Re: Help - Lumineux - 24.01.2016

https://sampwiki.blast.hk/wiki/Format


Re: Help - Champagne - 24.01.2016

Quote:
Originally Posted by Trucido
Посмотреть сообщение
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, sizeof(name));
 
    format(string, sizeof(string), "%s got dropped.", name);
    // whatever u want
     SendClientMessageToAll(-1, string);

   // ....
}
Thank you.