if(IsPlayerInRangeOfPoint(playerid, 2.0, pos[0], pos[1], pos[2])){if(pwl == 3) { ResetPlayerWeapons(giveplayerid); SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_NONE); SetPlayerScore(playerid,GetPlayerScore(playerid)+2); SetPlayerWantedLevel(giveplayerid,0); SetPlayerToTeamColour(giveplayerid); SetPVarInt(giveplayerid, \"Bilincselt\", 0); SetTimerEx(\"jailtime\", 120000,0,\"i\",giveplayerid); //2 perc börtön SetPlayerPos(giveplayerid,JailSpawnPoints[rnd][0],JailSpawnPoints[rnd][1],JailSpawnPoints[rnd][2]); SetPlayerInterior(giveplayerid,3); TogglePlayerControllable(giveplayerid, 1); SetPVarInt(giveplayerid, \"Jailed\", 1); return 1; }
#include < a_samp >#include < sscanf2 >#include < zcmd >#include < fixchars >main() { }new bortonidoa[MAX_PLAYERS];new bortonidob[MAX_PLAYERS];new bortonszamlalo[MAX_PLAYERS];new Text:hatralevo[MAX_PLAYERS];CMD:csuk(playerid, params[]){new ido;new giveplayerid;if(sscanf(params, \"ui\", giveplayerid, ido)) return 1;SendClientMessage(giveplayerid, -1, \"Bebörtönözve!\");SetTimerEx(\"jail\", ido*60000, false, \"i\", giveplayerid);bortonszamlalo[playerid] = SetTimerEx(\"jailcount\", 1000, true, \"i\", giveplayerid);bortonidoa[giveplayerid] = ido*60000;bortonidob[giveplayerid] = 0;TextDrawDestroy(hatralevo[giveplayerid]);hatralevo[giveplayerid] = TextDrawCreate(390, 100, \" \"); TextDrawFont(hatralevo[giveplayerid], 1);TextDrawColor(hatralevo[giveplayerid], 0xFFFFFFAA);TextDrawUseBox(hatralevo[giveplayerid], 1);TextDrawBoxColor(hatralevo[giveplayerid], 0x000000FF); TextDrawShowForPlayer(giveplayerid, hatralevo[giveplayerid]);return 1;}forward jail(playerid);public jail(playerid){SendClientMessage(playerid, -1, \"Szabadultál!\");KillTimer(bortonszamlalo[playerid]);TextDrawDestroy(hatralevo[playerid]);bortonidob[playerid] = 0;bortonidoa[playerid] = 0;}forward jailcount(playerid);public jailcount(playerid){bortonidob[playerid] = bortonidob[playerid]+1000;}public OnPlayerUpdate(playerid){new box[40];format(box, 40, \"Hátralévõ idõ: %d mp\", (bortonidoa[playerid]-bortonidob[playerid])/1000); TextDrawSetString(hatralevo[playerid], box);return 1;}