Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/givecash", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GREY, "USAGE: /givecash [player id/name] [money]");
- return 1;
- }
- new playa;
- new money;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- money = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 5)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- GetPlayerName(playa, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- ResetPlayerMoney(playa);
- ConsumingMoney[playa] = 1;
- GivePlayerMoney(playa, money);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not a admin!");
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment