help, i am newbie
#1

the is the prblem

how to make giveplayer money for new player, i mean the first money when they have registered
Reply
#2

pawn Код:
public OnPlayerSpawn
{
    GivePlayerMoney(playerid, TheAmountOfMoney);
    return 1;
}
Reply
#3

Lol the code is so wrong because it will give money everytime a player spawns, if you want to give money to player when hes playing first time you have to do such command when player registers.
Reply
#4

pawn Код:
public OnPlayerRegister
{
    GivePlayerMoney(playerid, TheAmountOfMoney);
    return 1;
}
?
Reply
#5

Quote:
Originally Posted by Namaco
Посмотреть сообщение
pawn Код:
public OnPlayerRegister
{
    GivePlayerMoney(playerid, TheAmountOfMoney);
    return 1;
}
?
Dude, why do you post crap everywhere?

Anyway, to do this, put this in your register command:
pawn Код:
CMD:register( playerid, params[ ] ) {
    SetPVarInt( playerid, "FirstPlay", 1 );
    return 1;
}
And, OnPlayerSpawn
pawn Код:
public OnPlayerSpawn( playerid ) {
    if( GetPVarInt( playerid, "FirstPlay" ) == 1 ) {
        SendClientMessage( playerid, -1, "You received $1000 for your first play. " );
        GivePlayerMoney( playerid, 1000 );
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by Mean
Посмотреть сообщение
Dude, why do you post crap everywhere?

Anyway, to do this, put this in your register command:
pawn Код:
CMD:register( playerid, params[ ] ) {
    SetPVarInt( playerid, "FirstPlay", 1 );
    return 1;
}
And, OnPlayerSpawn
pawn Код:
public OnPlayerSpawn( playerid ) {
    if( GetPVarInt( playerid, "FirstPlay" ) == 1 ) {
        SendClientMessage( playerid, -1, "You received $1000 for your first play. " );
        GivePlayerMoney( playerid, 1000 );
    }
    return 1;
}
thanx man, u r great
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)