30.04.2012, 16:44
This might work, you didn't explain it well even though.
You'll have to rewrite all the client messages!
You'll have to rewrite all the client messages!
pawn Код:
// NEW == Line changed
pawn Код:
if(strcmp(tmp, "Remove", true) == 0 || strcmp(tmp, "R", true) == 0)
{
if(GetAdminLevel(playerid) < 1 && !IsPlayerAdmin(playerid) && GetAdminSpay(playerid) < 1 && GetTempAdminLevel(playerid) < 1) return SendClientMessage(playerid, White, "My PC doesn't read Russian (Rewrite)");
if(activity == 0) return SendClientMessage(playerid,White,"My PC doesn't read Russian (Rewrite)");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity Remove [ID] :My PC doesn't read Russian (Rewrite)");
id = strval(tmp);
new Cash = GetPvarInt(id, "GivenMoney"); // NEW
GivePlayerMoney(id, -Cash); // NEW
format(string,sizeof(string),"????? ??????? ???? ???? ??? ???? %s ???? ?? ?????",GetName(id));
SendClientMessage(playerid,0x48c14ff, string);
format(string,sizeof(string),"???? ???? ????? ??????? ???? ???? ???? %s ??????",GetName(playerid));
SendClientMessage(id,0x48c14ff, string);
return 1;
}
if(strcmp(tmp, "GiveMoney", true) == 0 || strcmp(tmp, "Gm", true) == 0)
{
if(GetAdminLevel(playerid) < 1 && !IsPlayerAdmin(playerid) && GetAdminSpay(playerid) < 1 && GetTempAdminLevel(playerid) < 1) return SendClientMessage(playerid, White, "??? ?????? ??? ?????");
if(activity == 0) return SendClientMessage(playerid, White, "??? ??? ????? ??? ????? ????? ?????? ??????");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney(Gm) [id] [Money] :???? ??????");
id = strval(tmp);
tmp1 = strtok(cmdtext, idx);
if(!strlen(tmp1)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney [Money] :???? ??????");
any = strval(tmp1);
if(any < 1 || any > 150000) return SendClientMessage(playerid, White, "???? ???? ???? ????? ??? 150000 - 1");
any = strval(tmp1);
GivePlayerMoney(id, any);
SetPVarInt(playerid, "GivenMoney", any); // NEW
format(string, sizeof(string),"%d ???? ??????? ????? ?? ????? %s ?????", any, GetName(id));
SendClientMessageToAll(0x48c14ff, string);
return 1;
}