26.05.2010, 16:36
I'll ask it simply.
I want to know if GetPVar is a function because I want to know if i should use the same "form" always OR
I should store the GetPVar in any variable and use it.
My question is related to multi use of PVars.
Example:
Or
I want to know if GetPVar is a function because I want to know if i should use the same "form" always OR
I should store the GetPVar in any variable and use it.
My question is related to multi use of PVars.
Example:
pawn Код:
new MyMoney = GetPVar(playerid,"Cash");
giveplayermoney(playerid,-MyMoney);
for(new i; i < MAX_PLAYERS, i++)
{
if(IsPlayerConnected(i) && i != playerid)
{
giveplayermoney(i,MyMoney);
format(string,sizeof(string),"You got %d from %s",MyMoney,PlayerName);
sendclientmessage(i,color_white,string);
}
}
pawn Код:
giveplayermoney(playerid,-GetPVar(playerid,"Cash"));
for(new i; i < MAX_PLAYERS, i++)
{
if(IsPlayerConnected(i) && i != playerid)
{
giveplayermoney(i,GetPVar(playerid,"Cash"));
format(string,sizeof(string),"You got %d from %s",GetPVar(playerid,"Cash"),PlayerName);
sendclientmessage(i,color_white,string);
}
}