PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + trucker[End][cost];
format(string, 128, "%s possbile hack (Possible Money Hacks)", pName, playerid);
if(GetPlayerMoney(playerid) != PlayerInfo[playerid][pCash]) { GivePlayerMoney(playerid, -GetPlayerMoney(playerid)); GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]); // Player's a hacker, do whatever u want with him new string[180]; if (PlayerInfo[playerid][pAdmin] >= 3) { for (new i; i < MAX_PLAYERS; i++) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); format(string, 128, "%s possbile hack (Possible Money Hacks)", pName, playerid); SendClientMessage(i, -1, string); } } }
if(GetPlayerMoney(playerid) > PlayerInfo[playerid][pCash])
{
GivePlayerMoney(playerid, -GetPlayerMoney(playerid));
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
// Player's a hacker, do whatever u want with him
new string[180];
if (PlayerInfo[playerid][pAdmin] >= 3)
{
for (new i; i < MAX_PLAYERS; i++)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, 128, "%s possbile hack (Possible Money Hacks)", pName, playerid);
SendClientMessage(i, -1, string);
}
}
} else if (GetPlayerMoney(playerid) < PlayerInfo[playerid][pCash]) {
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
}
It's still sending messages, when i get money from the server. i don't want to send the message to the ones to the admins. who didn't hack the money. The ones who hacked the money will be send to the admins.
|
if(GetPlayerMoney(playerid) > PlayerInfo[playerid][pCash])
{
GivePlayerMoney(playerid, -GetPlayerMoney(playerid));
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
// Player's a hacker, do whatever u want with him
new string[180];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, 128, "%s possbile hack (Possible Money Hacks)", pName, playerid);
for (new p = GetPlayerPoolSize(); p >= 0; --p) {
if (PlayerInfo[p][pAdmin] >= 3) {
SendClientMessage(p, -1, string);
}
}
} else if (GetPlayerMoney(playerid) < PlayerInfo[playerid][pCash]) {
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
}
CMD:rescue(playerid, params[]) { if ((GetPlayerState(playerid) == PLAYER_STATE_WASTED) || GetPlayerState(playerid) == PLAYER_STATE_NONE) return 0; if(GetPlayerTeam(playerid) == TEAM_TRUCKER) { new rand = random(sizeof(TruckerSpawn)); SetPlayerPos(playerid, TruckerSpawn[rand][SpawnX], TruckerSpawn[rand][SpawnY], TruckerSpawn[rand][SpawnZ]); SetPlayerFacingAngle(playerid, TruckerSpawn[rand][SpawnAngle]); } if(GetPlayerTeam(playerid) == TEAM_COP) { new rand = random(sizeof(CopSpawn)); SetPlayerPos(playerid, CopSpawn[rand][SpawnX], CopSpawn[rand][SpawnY], CopSpawn[rand][SpawnZ]); SetPlayerFacingAngle(playerid, CopSpawn[rand][SpawnAngle]); } SetPlayerVirtualWorld(playerid, 1); Loadingmap(playerid); SendClientMessage(playerid, COLOUR_YELLOW, "You been rescued!"); SetCameraBehindPlayer(playerid); PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - 300; return 1; }
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - 300;
CMD:rescue(playerid, params[])
{
if ((GetPlayerState(playerid) == PLAYER_STATE_WASTED) || GetPlayerState(playerid) == PLAYER_STATE_NONE) return 0;
if(GetPlayerTeam(playerid) == TEAM_TRUCKER)
{
new rand = random(sizeof(TruckerSpawn));
SetPlayerPos(playerid, TruckerSpawn[rand][SpawnX], TruckerSpawn[rand][SpawnY], TruckerSpawn[rand][SpawnZ]);
SetPlayerFacingAngle(playerid, TruckerSpawn[rand][SpawnAngle]);
}
if(GetPlayerTeam(playerid) == TEAM_COP)
{
new rand = random(sizeof(CopSpawn));
SetPlayerPos(playerid, CopSpawn[rand][SpawnX], CopSpawn[rand][SpawnY], CopSpawn[rand][SpawnZ]);
SetPlayerFacingAngle(playerid, CopSpawn[rand][SpawnAngle]);
}
SetPlayerVirtualWorld(playerid, 1);
Loadingmap(playerid);
SendClientMessage(playerid, COLOUR_YELLOW, "You been rescued!");
SetCameraBehindPlayer(playerid);
GivePlayerMoney(playerid, -300); // Add it work?
//PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] - 300;
return 1;
}