Posts: 4,930
Threads: 467
Joined: Dec 2010
Quote:
Originally Posted by Mr.GeEk
pawn Код:
zcmd(adentrarse, playerid, params[]) { new string[260]; if(!PlayerToPoint(3.0,playerid, 2143.1162,1620.6515,1001.3387)) return SendClientMessageEx(playerid, COLOR_GRAD2, "No estas en el lugar edecuado."); if(Info[playerid][pLevel] < 3) return SendClientMessageEx(playerid, COLOR_GRAD2, "Debes ser nivel 3 en adelante, para usar esto."); format(string, sizeof(string), "* %s se metiу en el conducto de ventilaciуn.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); SetPosEx(playerid, 243.6492,1861.4480,17.9243, 0, 0 ,0); Dentro(playerid);//llamar la funcion dentro! return 1; }
forward Dentro(playerid); public Dentro(playerid) { new rand; if(IsPlayerInRangeOfPoint(playerid, 80, 2144.1560,1607.9908,993.6882)) { SendClientMessageEx(playerid, COLOR_GREY, "Llegу la guardia y estabas dentro, te han esposado y dejado en comisaria."); SendClientMessageEx(playerid, COLOR_GREY, "Por el robo que hiciste, te quitaron 35.000$, y te condenaron a prisiуn."); Info[playerid][pJailed] = 2; Info[playerid][pJailTime] = 15*60; GivePlayerCash(playerid, -1000); SetPlayerInterior(playerid, 10); Info[playerid][pInt] = 10; Info[playerid][pWantedLevel] = 0; SetPlayerWantedLevel(playerid, 0); rand = random(sizeof(SAPDPrisonSpawns)); SetPlayerPos(playerid, SAPDPrisonSpawns[rand][0], SAPDPrisonSpawns[rand][1], SAPDPrisonSpawns[rand][2]); LoadObjects(playerid); StopAudioStreamForPlayer(playerid); ResetPlayerWeaponsEx(playerid); GivePlayerCash(playerid, -35000); } KillTimer(Timer_Dentro[playerid]); return 1; }
|
ahi estaria colocando la funcion directa y se ejecutaria una sola vez, necesita colocar el settimerex , como ya le dije.
saludos.