Help onplayerentercheckpoint
#1

hi all
i create a faction named Tcc(TowCarCompany)
i want when player typed /tdeliver raise a check point and when player inter to check point give him money and the trailer that is attached to towcar destroy and they should wait at last 200 sec for every tdeliver but it doesn't Work Plz Help for +rep
Код:
CMD:tdeliver(playerid,params[])
{
	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "First login.");
	if(!IsATcc(playerid)) return SCM(playerid,COLOR_TCC,"You are not a Tcc member");
    if(!IsATowTruck(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_GREY, "You are not in towtruck.");
  	{
   		if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
     	{
       	else
       	{
        	SendClientMessage(playerid, COLOR_GREY,"You are currently not towing anything.");
        }
		TC[playerid] = 1;
		return 1;
}
i put it under onplayerentercheckpoint
Код:
if(TC[playerid == 1)
	{
	    SetPlayerCheckpoint(playerid,1948.1033,-1930.6860,13.4751,5);
		if(IsPlayerInRangeOfPoint(playerid,3,2189.4561,-1995.3540,13.2719))
		{
		    GiveZaiatMoney(playerid,1000);
	        TC[playerid] = 0;
		}
		return 1;
		}
		}
		}
Reply
#2

put this :
PHP код:
SetPlayerCheckpoint(playerid,1948.1033,-1930.6860,13.4751,5); 
after
PHP код:
TC[playerid] = 1
Reply
#3

maybe try this

pawn Код:
CMD:tdeliver(playerid,params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "First login.");
    if(!IsATcc(playerid)) return SCM(playerid,COLOR_TCC,"You are not a Tcc member");
    if(!IsATowTruck(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_GREY, "You are not in towtruck.");
    if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
    {
        TC[playerid] = 1;
        SetPlayerCheckpoint(playerid,1948.1033,-1930.6860,13.4751,5);

    }
    else return SendClientMessage(playerid, COLOR_GREY,"You are currently not towing anything.");
    return 1;
}

if(TC[playerid == 1)
{
    if(IsPlayerInRangeOfPoint(playerid,3,2189.4561,-1995.3540,13.2719))
    {
        GiveZaiatMoney(playerid,1000);
        TC[playerid] = 0;
    }
    return 1;
}
Reply
#4

it doesn't give me any money Plz Help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)