Money scripting
#1

I want that the players begin with 5000 $ and can give money to others
Reply
#2

Someon ?
Reply
#3

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerMoney(playerid, GetPlayerMoney(playerid) + 5000);
    return 1;
}
Reply
#4

On "OnPlayerSpawn":

Quote:

GivePlayerMoney(playerid,5000);

Код:
COMMAND:pay(playerid,params[])
{
new id, betrag;
if(sscanf(params,"dd",id,betrag)) return NoSuccess(playerid,"Usage /pay id amount");
if(!IsPlayerConnected(id)) return NoSuccess(playerid,"player is not connected!");
if(betrag < 0) return NoSuccess(playerid,"Amount cannot be under 0!");
if(GetPlayerMoney(playerid) < betrag) return NoSuccess(playerid,"dont have so much money!");

GivePlayerMoney(playerid,-betrag);
GivePlayerMoney(id,betrag);
return 1;
}
Reply
#5

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerMoney(playerid, GetPlayerMoney(playerid) + 5000);
    return 1;
}
Im getting this error 017: undefined symbol "SetPlayerMoney"
Reply
#6

SetPlayerMoney dont exist use my Code.

Код:
GivePlayerMoney(playerid,5000);
Reply
#7

Oke works , but how to give player money like this : /giveplayermoney [ID] 200 $
Reply
#8

from player money to player money or with an admin command where you can give people random money? when from player money to player money, then use my code i posted above.
Reply
#9

have done but get this warning "pay"
Reply
#10

Post the exact Pawn Code, then i get not a Warning.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)