SetTimerEx problem
#1

Hey guys, i'm working on my server and i have problem, settimerex not working !

This is my script :

Код:
#define pid playerid
if(newkeys & 65536){
		if(bp[pid]==1){
			new Float:bx[4], Float:by[4], Float:bz[4], zina[10], zinb[10], zinc[10], zind[10];
			GetVehiclePos(Burritos[0], bx[0], by[0], bz[0]);
			GetVehiclePos(Burritos[1], bx[1], by[1], bz[1]);
			GetVehiclePos(Burritos[2], bx[2], by[2], bz[2]);
			GetVehiclePos(Burritos[3], bx[3], by[3], bz[3]);
			if(IsPlayerInRangeOfPoint(pid, 3, bx[0], by[0], bz[0])){
				if(bpp[pid]==0){
					SetTimerEx("ddelete", 500, 0, "d", pid);
					ApplyAnimation(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0);
					bg[Burritos[0]]++;
					format(zina, 10, "%d", bg[Burritos[0]]);
					zinute(pid, -1, zina);
					bp[pid]=0;
					bpp[pid]=1;}
					}
			if(IsPlayerInRangeOfPoint(pid, 3, bx[1], by[1], bz[1])){
				if(bpp[pid]==0){
					SetTimerEx("ddelete", 500, 0, "d", pid);
					ApplyAnimation(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0);
					bg[Burritos[1]]++;
					format(zinb, 10, "%d", bg[Burritos[1]]);
					zinute(pid, -1, zinb);
					bp[pid]=0;
					bpp[pid]=1;}
					}
			if(IsPlayerInRangeOfPoint(pid, 3, bx[2], by[2], bz[2])){
				if(bpp[pid]==0){
					SetTimerEx("ddelete", 500, 0, "d", pid);
					ApplyAnimation(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0);
					bg[Burritos[2]]++;
					format(zinc, 10, "%d", bg[Burritos[2]]);
					bp[pid]=0;
					bpp[pid]=1;
					zinute(pid, -1, zinc);}}
			if(IsPlayerInRangeOfPoint(pid, 3, bx[3], by[3], bz[3])){
				if(bpp[pid]==0){
					SetTimerEx("ddelete", 500, 0, "d", pid);
					ApplyAnimation(playerid, "CARRY", "putdwn", 3.0, 0, 0, 0, 0, 0);
					bg[Burritos[3]]++;
					format(zind, 10, "%d", bg[Burritos[3]]);
					bp[pid]=0;
					bpp[pid]=1;
					zinute(pid, -1, zind);}}
			else { if(bpp[pid]==0){ zinute(pid, -1, "Prieik arčiau !"); } }}
		else {}}
	if(newkeys & 131072){
		if(bp[pid]==1){
			RemovePlayerAttachedObject(playerid, 0);
			SetPlayerSpecialAction(pid, SPECIAL_ACTION_NONE);
			bp[pid]=0;}
		else {}}

forward ddelete(pid);
public ddelete(pid){
	RemovePlayerAttachedObject(playerid, 0);
	SetPlayerSpecialAction(pid, SPECIAL_ACTION_NONE);
	bpp[pid]=1;
	return 1;}
Maybe someone know problem ? P.S sorry for bad english

No errors here, just bug
Reply
#2

bump
Reply
#3

you forgot to change your playerid to the code that you using it ( pid ) in RemovePlayerAttachedObject

Change

PHP код:
RemovePlayerAttachedObject(playerid0); 
To

PHP код:
RemovePlayerAttachedObject(pid0); 
Reply
#4

Not working. P.S with no settimerex it's working, but i need timer at anti-bugging
Reply
#5

bump
Reply
#6

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)