difference between stock and without stock
#4

Quote:
Originally Posted by tungki
Посмотреть сообщение
if youre using stock you can call it when you need it for example
pawn Код:
stock PlayerName(playerid)
{
      new name[MAX_PLAYER_NAME];
      GetPlayerName(playerid, name, MAX_PLAYER_NAME);
      return name;
}
and then call it without writing the code again
pawn Код:
new SzString[128]
format(SzString, sizeof(SzString), "Hello %s", PlayerName(playerid));
SendClientMessage(playerid, 1, SzString);
which will return Hello "Your Name"
PHP код:
PlayerName(playerid)
{
      new 
name[MAX_PLAYER_NAME];
      
GetPlayerName(playeridnameMAX_PLAYER_NAME);
      return 
name;
}
new 
tmp[30];
format(tmp sizeof tmp"Hello %s"PlayerName(playerid));
SendClientMessage(playerid1tmp); 
So what would this output?
Reply


Messages In This Thread
difference between stock and without stock - by iBots - 18.07.2017, 12:55
Re: difference between stock and without stock - by GoldenLion - 18.07.2017, 13:06
Re: difference between stock and without stock - by tungki - 18.07.2017, 13:14
Re: difference between stock and without stock - by ISmokezU - 18.07.2017, 13:22
Re: difference between stock and without stock - by OneDay - 18.07.2017, 13:30
Re: difference between stock and without stock - by aoky - 18.07.2017, 13:31
Re: difference between stock and without stock - by Sew_Sumi - 18.07.2017, 13:59
Re: difference between stock and without stock - by ISmokezU - 18.07.2017, 14:22
Re: difference between stock and without stock - by Paulice - 18.07.2017, 16:55

Forum Jump:


Users browsing this thread: 1 Guest(s)