14.09.2009, 14:32
Hello,
i am working on a /rob command
Im working with sscanf this is my command
Ok now my question is how to make that if someone rob someone or if someone gets robbed that they can see the name from eachtoher for example Sendclientmessage(playerid,0x....,яou have been robbed by BLABLA!");
and that robbers randomly steal money so not the same money always if they rob someone and that the money of the robbed one cant get nagativre plz help
i am working on a /rob command
Im working with sscanf this is my command
Код:
dcmd_rob(playerid, params[]) { new id; if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /rob [id]"); else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else if(GetDistanceBetweenPlayers(playerid,id) > 3) SendClientMessage(playerid,donkerrood,"The player is too far away"); else if(gTeam[playerid] != TEAM_ROB) { SendClientMessage(playerid,donkerrood,"You aren't a robber"); } else if(gTeam[id] == TEAM_ROB) { SendClientMessage(playerid,donkerrood,"You can't Rob a Robber he's a friend!"); } else if(gTeam[playerid] == TEAM_ROB) { { SendClientMessage(playerid,blauw,"You have robbed someone!!"); SendClientMessage(id,donkerrood,"You have been robbed!!"); GivePlayerMoney(playerid,18537); GivePlayerMoney(id,-18537); } } return 1; }
Ok now my question is how to make that if someone rob someone or if someone gets robbed that they can see the name from eachtoher for example Sendclientmessage(playerid,0x....,яou have been robbed by BLABLA!");
and that robbers randomly steal money so not the same money always if they rob someone and that the money of the robbed one cant get nagativre plz help