#5

Quote:
Originally Posted by G4M3Ov3r
Посмотреть сообщение
PHP код:
COMMAND:stats(playeridparams[])
{
    new 
kills;
    new 
deaths;
    
deaths PlayerInfo[playerid][pDeaths];
    
kills PlayerInfo[playerid][pKills];
    
format(Stringsizeof(String), "Kills: %d || Deaths: %d"killsdeaths);
    
SendClientMessage(playeridCOLOR_REDDString);
    return 
1;

I'm not understanding. Why would you re-declare a variable?

PHP код:
CMD:stats(playeridparams[])
{
    new 
string[128];
    
format(stringsizeof(string), "Kills: %d || Deaths: %d"PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
    
SendClientMessage(playeridCOLOR_REDDstring);
    return 
1;

Wouldn't that be simpler?
Reply


Messages In This Thread
K/D - by tarez - 07.09.2011, 23:49
Re: K/D - by Scenario - 08.09.2011, 00:04
Re: K/D - by tarez - 08.09.2011, 00:12
Re: K/D - by =WoR=G4M3Ov3r - 08.09.2011, 00:16
Re: K/D - by Kush - 08.09.2011, 00:33
Re: K/D - by =WoR=G4M3Ov3r - 08.09.2011, 00:36
Re: K/D - by Kush - 08.09.2011, 00:54
Re: K/D - by Scenario - 08.09.2011, 00:55
Re: K/D - by Kush - 08.09.2011, 00:59
Re: K/D - by =WoR=Varth - 08.09.2011, 06:51

Forum Jump:


Users browsing this thread: 2 Guest(s)