18.10.2010, 19:43
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;
}