23.11.2011, 06:38
I am attempting to make my first gamemode, which is going to be a deathmatch gamemode to learn, however after a respawn I would like it to tell you what your kill streak currently is, obviously it is going to be one, but I would like to figure out how to use %d to tell the player. If that made any sense at all...
Here is the code:
The main problem I am having is the "format" part. I have looked everywhere I can not understand it, nor can I understand how the wiki stated it. I have been toying around with this for the past hour and a half and no luck. At one point the format part looked something like this:
But it looked retarded and was not working, so I botched it to my current creation.
Here is the code:
Код:
public OnPlayerSpawn(playerid) { SendClientMessage(playerid, COLOR_RED, "Your objective is simple, find and kill all others. It is every man for himself!"); killstreak = 1; format("Your currently have a %d killstreak!", killstreak); SendClientMessage(playerid, COLOR_RED, killstreak); return 1; }
Код:
format(killstreak, sizeof(killstreak), "Your currently have a %d killstreak!", killstreak);