06.05.2014, 21:23
Hi, I have a problem when I do not get into checkpoint give money. I did give me money depending on trailer Sorry for my bad english
PHP код:
if(CP[playerid] == truck1 || truck2 || truck3 || truck4 || truck5) // finish job
{
new string[128], random_money = 25000+random(10000);
{
if(GetVehicleTrailer(GetPlayerVehicleID(playerid))) SendClientMessage(playerid, 0xFFFFFFAA, "You are currently towing a trailer.");
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403)
if(!IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))){ DisablePlayerCheckpoint(playerid); return 1; }
{
switch ( GetVehicleTrailer ( GetPlayerVehicleID ( playerid ) ) )
{
case 450:
{
random_money = 25000 + random ( 10000 );
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + random_money;
format(string,sizeof(string),"[+]Congratulations you reached the destination. You got $%s ", FormatMoney(random_money));
SendClientMessage(playerid, COLOR_GREEN, string);
}
case 584:
{
random_money = 35000 + random ( 40000 );
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + random_money;
format(string,sizeof(string),"[+]Congratulations you reached the destination. You got $%s ", FormatMoney(random_money));
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}
}
}
}