29.05.2010, 10:38
This tutorial will stop cash hackers, But the only problem is that tranfender is free! Anyway Enjoy.
Also: If you want to give people cash do,
Step 1:
Place This At The Top Of Your Script.
Then Place The Following Code Under Onplayerconnect and OnPlayerDisconnect
Step 2:
Put this code under OnGameModeInit, This will set a timer for PlayerTimer to declare.
Step 3:
Then This Public Will Check If Its Severside Cash Increase Or Client.
Sorry About Indentation!
Also: If you want to give people cash do,
pawn Код:
PlayerCash[playerid] += amount here;
Step 1:
Place This At The Top Of Your Script.
pawn Код:
new PlayerMoney[MAX_PLAYERS];
new OldCash[MAX_PLAYERS];
forward PlayerTimer()
pawn Код:
PlayerMoney[playerid] = 0;
OldCash[playerid] = 0;
Put this code under OnGameModeInit, This will set a timer for PlayerTimer to declare.
pawn Код:
SetTimer("PlayerTimer",1000,1);
Then This Public Will Check If Its Severside Cash Increase Or Client.
pawn Код:
public PlayerTimer()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerMoney(i) != PlayerCash[i])
{
OldCash[i] = GetPlayerMoney(i);
ResetPlayerMoney(i);
GivePlayerMoney(i,PlayerCash[i]);
return 1;
}
}
}
return 1;
}