18.02.2012, 07:32
i have this
How can i make it so when i put someone in prison that i decide how much because that line
Makes up the time i want for me to decide how much the person will be in the prison
Код:
if(strcmp(cmd, "/prison",true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 1338) { SendClientMessage(playerid, COLOR_GREY, " Ne ste ovlasteni za taa komanda !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /prison [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Go zatvorivte %s vo Popraven dom.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTRED, string); format(string, sizeof(string), "* Zatvoreni ste vo popraven dom od admin %s.", sendername); SendClientMessage(giveplayerid, COLOR_LIGHTRED, string); GameTextForPlayer(giveplayerid, "~w~Dobrodojdovte vo ~n~~r~Popraven dom", 5000, 3); WantedPoints[giveplayerid] = 0; WantedLevel[giveplayerid] = 0; PlayerInfo[giveplayerid][pJailed] = 2; PlayerInfo[giveplayerid][pJailTime] = 1000; SetPlayerPos(giveplayerid, 122.69999695,1906.69995117,-53.09999847); SetPlayerPos(giveplayerid, 122.40000153,1928.90002441,-53.09999847); SetPlayerWorldBounds(giveplayerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811 } } else { SendClientMessage(playerid, COLOR_GREY, " Toj igrac e isklucen !"); return 1; } } return 1; }
Quote:
PlayerInfo[giveplayerid][pJailTime] = 1000; |