Send a message to all players with the same skin
#6

Hey, check this out:
PHP код:
if(!strcmp(cmdtext"/radio"true))
{
    if(
IsPlayerConnected(playerid))
    {
        if(!
cmdtext[6])
            return 
SendClientMessage(playerid, -1"USAGE: /radio [text]");
        
        
enum A_P_Info
        
{
            
A_P_Name[30],
            
A_P_ID
        
}
        
        static const 
Airplanes[][A_P_Info] =
        {
            {
"Andromada"592}, {"AT-400"577}, {"Beagle"511}, {"Cropduster"512},
            {
"Dodo"593}, {"Hydra"520}, {"Nevada"553}, {"Rustle"476},
            {
"Shamal"519}, {"Skimmer"460}, {"Stuntplane"513}, {"Cargobob"548},
            {
"Hunter"425}, {"Leviathan"417}, {"Maverick"487}, {"News Maverick"488},
            {
"Police Maverick"497}, {"Raindance"563}, {"Seasparrow"447}, {"Sparrow"469}
        };
    
        if(!(
GetPlayerSkin(playerid) == 61))
            return 
SendClientMessage(playerid, -1"You are not a pilot !");
        
#if !defined string
            
new string[128];
        
#endif
        #if !defined pName
            
new pName[MAX_PLAYER_NAME];
        
#endif
        
new Airplane_name[30], vehidmodelbool:check false;
        
vehid GetPlayerVehicleID(playerid);
        
model GetVehicleModel(vehid);
        
        for(new 
0sizeof(Airplanes); ji++)
            if(
model == Airplanes[i][A_P_ID])
            {
                
format(Airplane_name30"%s"Airplanes[i][A_P_Name]);
                
check true;
                break;
            }
            
        if(!
check)
            return 
SendClientMessage(playerid, -1"[ERROR]: You are not in a airplane or in a helicopter !");
        
GetPlayerName(playeridpNameMAX_PLAYER_NAME);
        
format(string128"[Pilot %s - from %s]: %s"pNameAirplane_namecmdtext[7]);
        for(new 
0MAX_PLAYERSi++)
            if(
GetPlayerSkin(i) == 61)
                
SendClientMessage(i0xFF000000string);
    }
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)