Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:alkotest(playerid, params[], help)
- {
- #pragma unused help
- {
- if(IsACop(playerid))
- {
- new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME], giveplayerid, string[128];
- if(sscanf(params,"u",giveplayerid)) return SCM(playerid, COLOR_GREY, "Koriscenje: /alkotest [playerID/DeoImena]");
- new level = GetPlayerDrunkLevel(giveplayerid);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 3)
- {
- if(level > 600)
- {
- format(string, sizeof(string), "* %s uzima alkohol test uredjaj i stavlja ga u %s'ova usta.", sendername ,giveplayer);
- CetaProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
- SCM(playerid, PURPLE, "** Alkohol Test Rezultat: Pozitivan **");
- GameTextForPlayer(playerid,"~y~Ovaj igrac je~n~~y~Pijan", 8000, 1);
- return 1;
- }
- else
- {
- format(string, sizeof(string), "* %s uzima alkohol test uredjaj i stavlja ga u %s'ova usta.", sendername ,giveplayer);
- CetaProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
- SCM(playerid, PURPLE, "** Alkohol Test Rezultat: Negativan **");
- GameTextForPlayer(playerid,"~y~Ovaj igrac ~n~~y~Nije pijan", 8000, 1);
- return 1;
- }
- }
- }
- }
- else
- {
- SCM(playerid, PURPLE, " Niste ovlasceni da koristite ovu komandu! (Cops Only)");
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment