new bool: mozizik[MAX_PLAYERS];
new mozitimer[MAX_PLAYERS];
CMD:mozi(playerid,params[])
{
new p[3],n[24],str[128]; GetPlayerPos(playerid,p[0],p[1],p[2]); GetPlayerName(playerid,n,24);
if(IsPlayerInRangeOfPoint(playerid,MOZI pozíciója: x,y,z ,5.0)) { //itt majd írd át
if(mozizik[playerid] == false) {
for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerInRangeOfPoint(i,p[0],p[1],p[2],10.0)) {
format(str,128,\"%s leült filmet nézni.\",n);
SendClientMessage(i,0xbb00bbff,str);
mozitimer[playerid] = SetTimerEx(\"moziEnd\",1*60*1000,\"d\",playerid);
} }
TogglePlayerControllable(playerid,0);
} else { SendClientMessage(playerid,-1,\"Már mozizol!\");
}
return 1;
}
public moziEnd(playerid);
public moziEnd(playerid)
{
new p[3],n[24],str[128]; GetPlayerPos(playerid,p[0],p[1],p[2]); GetPlayerName(playerid,n,24); format(str,128,\"%s befejezte a filmezést!\",n);
KillTimer(mozitimer[playerid]);
for(new i; i < GetMaxPlayers(); i++) { if(IsPlayerInRangeOfPoint(i,p[0],p[1],p[2], 10.0)) {
SendClientMessage(i, 0xbb00bbff,str);
} }
TogglePlayerControllable(playerid,1);
return 1;
}
nem pont ugyanaz de megcsináltam hasonlót