SendClientMessage Error
#2

Just use else statement:
PHP код:
COMMAND:cargo(playerid,params[])
{
    if(
pInfo[playerid][pCargo] == 1) return SendClientMessage(playeridRED"Already Delivering Cargo!");
    if(
GetVehicleModel(GetPlayerVehicleID(playerid)) != 519) return SendClientMessage(playeridRED,"You Must be in a Shamal to Start this Job!");
    
    if(
IsPlayerInRangeOfPoint(playerid500.01761.4497,-2494.3818,13.5547)) // LS LOC
    
{
        
pInfo[playerid][pCargo] = 1;
        
pInfo[playerid][pCargoM] = 0;
        
pInfo[playerid][pCargoD] = 3;
        
TextDrawShowForPlayer(playeridCargoTD);
        
TextDrawShowForPlayer(playeridCargoLoc[playerid]);
        
SendClientMessage(playeridYELLOW"Cargo Delivery: Load and Deliver Cargo to and from Airports all around San Andreas!");
        
Streamer_AppendArrayData(STREAMER_TYPE_CPCheckpoint[193], E_STREAMER_PLAYER_IDplayerid);
        new 
str[48];
        
format(str,sizeof(str),"~b~~h~Location: ~g~Los Santos Airport");
        
TextDrawSetString(CargoLoc[playerid], str);
        
SendClientMessage(playeridYELLOW"Load Cargo from Los Santos Airport for Delivery!");
    }
    else if(
IsPlayerInRangeOfPoint(playerid500.0, -1397.5881,-284.6473,26.2160)) // SF LOC
    
{
        
pInfo[playerid][pCargo] = 1;
        
pInfo[playerid][pCargoM] = 0;
        
pInfo[playerid][pCargoD] = 3;
        
TextDrawShowForPlayer(playeridCargoTD);
        
TextDrawShowForPlayer(playeridCargoLoc[playerid]);
        
SendClientMessage(playeridYELLOW"Cargo Delivery: Load and Deliver Cargo to and from Airports all around San Andreas!");
        
Streamer_AppendArrayData(STREAMER_TYPE_CPCheckpoint[194], E_STREAMER_PLAYER_IDplayerid);
        new 
str[48];
        
format(str,sizeof(str),"~b~~h~Location: ~g~San Fierro Airport");
        
TextDrawSetString(CargoLoc[playerid], str);
        
SendClientMessage(playeridYELLOW"Load Cargo from San Fierro Airport for Delivery!");
    }
    else if(
IsPlayerInRangeOfPoint(playerid500.01473.1907,1507.4999,10.8203)) // LV LOC
    
{
        
pInfo[playerid][pCargo] = 1;
        
pInfo[playerid][pCargoM] = 0;
        
pInfo[playerid][pCargoD] = 3;
        
TextDrawShowForPlayer(playeridCargoTD);
        
TextDrawShowForPlayer(playeridCargoLoc[playerid]);
        
SendClientMessage(playeridYELLOW"Cargo Delivery: Load and Deliver Cargo to and from Airports all around San Andreas!");
        
Streamer_AppendArrayData(STREAMER_TYPE_CPCheckpoint[195], E_STREAMER_PLAYER_IDplayerid);
        new 
str[48];
        
format(str,sizeof(str),"~b~~h~Location: ~g~Las Venturas Airport");
        
TextDrawSetString(CargoLoc[playerid], str);
        
SendClientMessage(playeridYELLOW"Load Cargo from Las Venturas Airport for Delivery!");
    }
    else if(
IsPlayerInRangeOfPoint(playerid500.0164.0293,2494.4155,16.4844)) // ABAND LOC
    
{
        
pInfo[playerid][pCargo] = 1;
        
pInfo[playerid][pCargoM] = 0;
        
pInfo[playerid][pCargoD] = 3;
        
TextDrawShowForPlayer(playeridCargoTD);
        
TextDrawShowForPlayer(playeridCargoLoc[playerid]);
        
SendClientMessage(playeridYELLOW"Cargo Delivery: Load and Deliver Cargo to and from Airports all around San Andreas!");
        
Streamer_AppendArrayData(STREAMER_TYPE_CPCheckpoint[196], E_STREAMER_PLAYER_IDplayerid);
        new 
str[48];
        
format(str,sizeof(str),"~b~~h~Location: ~g~Abandoned Airport");
        
TextDrawSetString(CargoLoc[playerid], str);
        
SendClientMessage(playeridYELLOW"Load Cargo from Abandoned Airport for Delivery!");
    }
    else 
SendClientMessage(playeridRED"You can only start a Cargo Mission at an Airport!");
    return 
1;

Reply


Messages In This Thread
SendClientMessage Error - by tommzy09 - 24.05.2015, 16:02
Re: SendClientMessage Error - by Konstantinos - 24.05.2015, 16:11
Re: SendClientMessage Error - by Evocator - 24.05.2015, 16:13
Re: SendClientMessage Error - by tommzy09 - 24.05.2015, 16:17

Forum Jump:


Users browsing this thread: 1 Guest(s)