Sweeper again
#1

They can join every marker just without an sweeper and at the end the dont get the money + exp.
Please hlep

pawn Code:
if(sweepercp[playerid] == 34)
{
    for(new i; i < sizeof(sweeper); i++)
    {
        if(vehicleid == sweeper[i])
        {
        GivePlayerMoney(playerid, 5000);
        PlayerInfo[i][pExp] ++;
        SendClientMessage(playerid, COLOR_GREEN, "Well done buddy, you have cleaned some streets!");
        SendClientMessage(playerid, COLOR_GREEN, "You have received $ 5000 and 1 exp.");
        break;
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You need to be in a sweeper!");
            SendClientMessage(playerid, COLOR_RED, "Type /stopjob if you want to stop with cleaning the city.");
        }
    }
return 1;
}
Reply
#2

pawn Code:
if(sweepercp[playerid] == 34)
{
    if(GetVehicleModel(vehicleid) == modelid) // Where modelid = model ID of sweeper vehicle in San Andreas, would be a lot more sufficient than that loop you have.
    {
        GivePlayerMoney(playerid, 5000);
        PlayerInfo[i][pExp] ++;
        SendClientMessage(playerid, COLOR_GREEN, "Well done buddy, you have cleaned some streets!");
        SendClientMessage(playerid, COLOR_GREEN, "You have received $ 5000 and 1 exp.");
        break; // Why?
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "You need to be in a sweeper!");
        SendClientMessage(playerid, COLOR_RED, "Type /stopjob if you want to stop with cleaning the city.");
    }
    return 1;
}
Hopefully that helps.
Reply
#3

Nope, that didnt help D:
Reply
#4

Quote:
Originally Posted by geerdinho8
View Post
Nope, that didnt help D:
Why didn't it help? What went wrong and what do you need?
Reply
#5

When i just do the model(574), the same thing happens..
Reply
#6

Quote:
Originally Posted by geerdinho8
View Post
When i just do the model(574), the same thing happens..
Did you take out the break;? And is the vehicleid actually gotten through some sort of method? Like GetPlayerVehicleID?
Reply
#7

everything will bug then.
Reply
#8

Quote:
Originally Posted by geerdinho8
View Post
everything will bug then.
Why will it bug? Can we see more code? You're not really helping us help you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)