pInfo[targetid][pMoney] += givemoney; pInfo[playerid][pMoney] -= givemoney;
stock GiveMoney(playerid,money) { if(HalloweenMode == 1) { money += 2500; ShowNotMsg(playerid, money, 2, 1); pInfo[playerid][pMoney] += money; } else { if(DowntimeMode == 1) { money += 8500; ShowNotMsg(playerid, money, 5, 1); pInfo[playerid][pMoney] += money; } else { if(ChristmasMode == 1) { if(pInfo[playerid][pVipLevel] >= 1) { money += 4500; ShowNotMsg(playerid, money, 3, 1); pInfo[playerid][pMoney] += money; } else { money += 2500; ShowNotMsg(playerid, money, 2, 1); pInfo[playerid][pMoney] += money; } } else { ShowNotMsg(playerid, money, 0, 1); pInfo[playerid][pMoney] += money; } } } return 1; }
CallRemoteFunction(GiveMoney(i(orplayerid), 10000);
CallRemoteFunction(if(pInfo[playerid][pAdminLevel] >= 1));
forward CallMe(number, const string[]);
public CallMe(number, const string[])
{
printf("CallMe called. Int: %i String: %s.", number, string);
return 1;
}
// Somewhere... in another file perhaps?
CallRemoteFunction("CallMe", "is", 69, "this is a string");
forward public GiveMoney(playerid,money);
public GiveMoney(playerid,money)
{
if(HalloweenMode == 1)
{
money += 2500;
ShowNotMsg(playerid, money, 2, 1);
pInfo[playerid][pMoney] += money;
}
else
{
if(DowntimeMode == 1)
{
money += 8500;
ShowNotMsg(playerid, money, 5, 1);
pInfo[playerid][pMoney] += money;
}
else
{
if(ChristmasMode == 1)
{
if(pInfo[playerid][pVipLevel] >= 1)
{
money += 4500;
ShowNotMsg(playerid, money, 3, 1);
pInfo[playerid][pMoney] += money;
}
else
{
money += 2500;
ShowNotMsg(playerid, money, 2, 1);
pInfo[playerid][pMoney] += money;
}
}
else
{
ShowNotMsg(playerid, money, 0, 1);
pInfo[playerid][pMoney] += money;
}
}
}
return 1;
}
CallRemoteFunction("GiveMoney", "id", i(orplayerid), 10000);
forward public GetPlayerLevelz(playerid);
public GetPlayerLevelz(playerid)
{
return pInfo[playerid][pAdminLevel];
}
if(CallRemoteFunction("GetPlayerLevelz", "i", playerid) > 0)
{
}
Well, CallRemoteFunction calls a forwarded and public function not stock...
you can return a value in ur public function and callremotefunction will return this value for you. so it would be: PHP код:
PHP код:
PHP код:
PHP код:
|
CallRemoteFunction("GiveMoney", "id",playerid, 10000);
CallRemoteFunction("GiveMoney", "id", i, 10000);
Pretty good explanation thank you but about the money lets say I can do this?
PHP код:
PHP код:
|