Requesting help with OnPlayerEnterVehicle
#1

Hi, I want, when a player enters in vehicle "574"(Sweeper). He'll start the job.

The problem is that no message is sent. Also the money is not sent to the player here is the code:

PHP Code:
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    switch(
vehicleid)
    {
        case 
574:
        {
        
SendClientMessage(playerid, -1"You are now street sweeping to earn money. Drive around to get your money");
        
SetTimer("Sweeping"10000false);
        }
    }
    return 
1;
}
forward Sweeping(playerid);
public 
Sweeping(playerid)
{
new 
string[128];
new 
rand 200 random(500);
GivePlayerMoney(playeridrand);
format(stringsizeof(string), "You have received $%d for your street sweeping job"rand);
SendClientMessage(playerid, -1string);
return 
1;

Reply


Messages In This Thread
Requesting help with OnPlayerEnterVehicle - by Magic_Time - 05.02.2013, 15:59
Re: Requesting help with OnPlayerEnterVehicle - by Pangea - 05.02.2013, 16:01
Re: Requesting help with OnPlayerEnterVehicle - by Magic_Time - 05.02.2013, 16:05
Re: Requesting help with OnPlayerEnterVehicle - by Pangea - 05.02.2013, 16:13
Re: Requesting help with OnPlayerEnterVehicle - by Magic_Time - 05.02.2013, 16:19

Forum Jump:


Users browsing this thread: 1 Guest(s)