Script money on join -
Natureforce - 25.08.2012
Hello guys
I'm very new in scripting a SAMP server.
I really can't figure out how i can script that people who join for first on my server get money, for example 2000 bucks.
I ******d for scripts for hours, but i couldn't find one.
I'm sorry this sounds so noob, but i really can't figure this out.
I will appreciate it a lot if someone would post a simple script to do this.
Thank you guys!
Michiel
Re: Script money on join -
clarencecuzz - 25.08.2012
pawn Код:
public OnPlayerConnect(playerid)
{
if(Registered[playerid] == 0) //The player is not registered
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 2000);
}
return 1;
}
Re: Script money on join -
Natureforce - 25.08.2012
Thank you a lot!
Re: Script money on join -
Natureforce - 25.08.2012
When hitting F5, i'm getting this.
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : error 029: invalid expression, assumed zero
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : error 021: symbol already defined: "OnPlayerConnect"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Script money on join -
[MWR]Blood - 25.08.2012
You've got the OnPlayerConnect callback
pawn Код:
public OnPlayerConnect(playerid)
twice in your script.
Re: Script money on join -
Natureforce - 25.08.2012
Ok, fixed that, but now i'm getting this.
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(62) : error 017: undefined symbol "Registered"
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(62) : warning 215: expression has no effect
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(62) : error 001: expected token: ";", but found "]"
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(62) : error 029: invalid expression, assumed zero
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(62) : fatal error 107: too many error messages on one line
Re: Script money on join -
clarencecuzz - 25.08.2012
Oh, you actually want us to make you a register system?
Try this:
https://sampforum.blast.hk/showthread.php?tid=120724
Re : Script money on join -
DaTa[X] - 25.08.2012
if the player not
registred
Код:
public OnPlayerConnect(playerid)
{
GivePlayerMoney(playerid,2000);
return 1;
}
Re: Script money on join -
Natureforce - 25.08.2012
GivePlayerMoney(player
id,2000);?
Re: Script money on join -
Natureforce - 25.08.2012
Thanks guys.
I installed the login/register system, and it works.
But i'm still having this error.
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : error 017: undefined symbol "Registered"
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : warning 215: expression has no effect
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : error 001: expected token: ";", but found "]"
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : error 029: invalid expression, assumed zero
C:\Users\Michiel\Servers\GTA sa\Gta test\gamemodes\test.pwn(63) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
With this code
public OnPlayerConnect(playerid){ if(Registered[playerid] == 0) //The player is not registered { ResetPlayerMoney(playerid); GivePlayerMoney(playerid, 2000); } return 1;}