28.11.2013, 17:07
(
Последний раз редактировалось Felipee; 28.11.2013 в 17:43.
)
Hello,
Can someone help me with /slap command?
I want to add when you slap player you need to type in a reason why...
example; Mark_Wilson has been slapped by Admin, reason: mg
Im using GTARP mod.
Can someone help me with /slap command?
I want to add when you slap player you need to type in a reason why...
example; Mark_Wilson has been slapped by Admin, reason: mg
Im using GTARP mod.
Код:
//-----------------------------------[Slap]----------------------------------------------- if(strcmp(cmd, "/slap", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "KORISCENJE: /slap [ID Igraca/Dio Imena]"); return 1; } new playa; new Float:shealth; new Float:slx, Float:sly, Float:slz; playa = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >=1) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); GetPlayerHealth(playa, shealth); SetPlayerHealth(playa, shealth-5); GetPlayerPos(playa, slx, sly, slz); SetPlayerPos(playa, slx, sly, slz+5); PlayerPlaySound(playa, 1130, slx, sly, slz+5); printf("[SLAP] %s je osamaren od strane Admina.",sendername, giveplayer ); format(string, sizeof(string), "[SLAP] %s je osamaren od strane Admina ",giveplayer ,sendername ); BroadCast(COLOR_LIGHTRED,string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, "Nemate pristup ovoj komandi!"); } } return 1; }