What is wrong?
#1

I make the command:
PHP код:
CMD:work(playerid,params[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Trebuie sa te loghezi mai intai.");
    
    if(
PlayerInfo[playerid][pJob] != 14) return SCM(playerid,COLOR_WHITE,"{FFF8C6}You are not a Trucker.");
    if(!
IsPlayerInRangeOfPoint(playerid10.0, -146.3690,-1116.3546,4.2725)) return SCM(playerid,COLOR_WHITE,"{FFF8C6}You are not the place where you can get products.");
    new 
Trucker CreateVehicle(515,-142.5756,-1116.7383,5.3989,257.1702,3,77,-1); // Trucker si remorca
    
new TrailerID CreateVehicle(450,-152.0133,-1114.9786,5.9868,258.3351,3,77,-1); // Trucker si remorca
    
AttachTrailerToVehicle(TrailerID,GetPlayerVehicleID(playerid));
    
PutPlayerInVehicle(playerid,Trucker,0);
    
SetPlayerCheckpoint(playerid,-96.4776,-1159.1644,2.0905,4.0);
    
IsTruckerStart[playerid] = 1;
    return 
1;

And i put this OnPLayerEnterCheckpoint
PHP код:
else if(IsTruckerStart[playerid] == && ccar && IsATruck(tmpcar))
    {
        if(
IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
        {
            
DisablePlayerCheckpoint(playerid);
            new 
randtrucker 30000 random(20000);
            
format(string,sizeof(string),"{FFFF00}You received %s$ for your work.",FormatNumber(randtrucker));
            
SCM(playerid,COLOR_WHITE,string);
            
GivePlayerCash(playerid,randtrucker);
            
Update(playeridpCashx);
        }
        else return 
SendClientMessage(playerid,COLOR_YELLOW,"Where is the Trailer? ");
    } 
BUT when i enter in checkpoint not give me money and not disable checkpoint, why? PLS
Reply
#2

May be you need to use GivePlayerMoney, not GivePlayerCash.. or you have anti money hack??

EDIT: And I will suggest you to use streamer plugin. Because of that you can set the id of checkpoints and you can disable it by Id for player. https://sampforum.blast.hk/showthread.php?tid=102865
Reply
#3

i have streamer, i have all, not GivePlayerMoney is problem
Reply
#4

What is ccar, give us more code from OnPlayerEnterCheckpoint
Reply
#5

Uh...
Well the reason it's not giving money == GivePlayerCash..

It's

GivePlayerMoney(playerid, amount);


PHP код:
else if(IsTruckerStart[playerid] == && ccar && IsATruck(tmpcar))
    {
        if(
IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
        {
            
DisablePlayerCheckpoint(playerid);
            new 
randtrucker 30000 random(20000);
            
format(string,sizeof(string),"{FFFF00}You received %s$ for your work.",FormatNumber(randtrucker));
            
SCM(playerid,COLOR_WHITE,string);
            
GivePlayerMoney(playeridrandtrucker);
            
Update(playeridpCashx);
        }
        else return 
SendClientMessage(playerid,COLOR_YELLOW,"Where is the Trailer? ");
    } 

Try that
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)