Neon Problem
#1

look if I type /neon red or different colors it bugs...so I want a thing so I cant put anther neon on car..and messaaaage..please help!ive been trying since a long time..but couldent fix..and if I respawn car..it still has neon on car..

PHP код:
 if(strcmp(cmd,"/neon",true)==0)
                    {
                        if(
IsPlayerConnected(playerid))
                        {
                            new 
x_job[64];
                            
x_job strtok(cmdtextidx);
                            if(!
strlen(x_job)) {
                                
SendClientMessage(playeridCOLOR_WHITE"|__________________ Neon __________________|");
                                
SendClientMessage(playeridCOLOR_WHITE"USAGE: /neon [name]");
                                
SendClientMessage(playeridCOLOR_GREY"Available names: Red, Blue, Yellow, White, Pink, Green, Takeoff");
                                
SendClientMessage(playeridCOLOR_WHITE"|____________________________________________|");
                                return 
1;
                            }
                            if(
strcmp(x_job,"red",true) == 0)
                            {
                                    if(
Neon[playerid] < 0){return 1;}
                                    
SetPVarInt(playerid"neon"1);
                                    
SetPVarInt(playerid"red"CreateObject(18647,0,0,0,0,0,0));
                                    
SetPVarInt(playerid"red1"CreateObject(18647,0,0,0,0,0,0));
                                    
AttachObjectToVehicle(GetPVarInt(playerid"red"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                                    
AttachObjectToVehicle(GetPVarInt(playerid"red1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                                    
GameTextForPlayer(playerid"~r~Red ~w~Neon has been added to your vehicle",3500,5);
                                }
                                else if(
strcmp(x_job,"blue",true) == 0)
                                {
                                    if(
Neon[playerid] < 0){return 1;}
                                    
SetPVarInt(playerid"neon"1);
                                    
SetPVarInt(playerid"blue"CreateObject(18648,0,0,0,0,0,0));
                                    
SetPVarInt(playerid"blue1"CreateObject(18648,0,0,0,0,0,0));
                                    
AttachObjectToVehicle(GetPVarInt(playerid"blue"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                                    
AttachObjectToVehicle(GetPVarInt(playerid"blue1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                                    
GameTextForPlayer(playerid"~b~ Blue ~w~Neon has been added to your vehicle",3500,5);
                                }
                                else if(
strcmp(x_job,"yellow",true) == 0)
                                {
                                    if(
Neon[playerid] < 0){return 1;}
                                    
SetPVarInt(playerid"neon"1);
                                    
SetPVarInt(playerid"yellow"CreateObject(18650,0,0,0,0,0,0));
                                    
SetPVarInt(playerid"yellow1"CreateObject(18650,0,0,0,0,0,0));
                                    
AttachObjectToVehicle(GetPVarInt(playerid"yellow"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                                    
AttachObjectToVehicle(GetPVarInt(playerid"yellow1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                                    
GameTextForPlayer(playerid"~y~Yellow~w~ Neon has been added to your vehicle",3500,5);
                                }
                                else if(
strcmp(x_job,"white",true) == 0)
                                {
                                    if(
Neon[playerid] < 0){return 1;}
                                    
SetPVarInt(playerid"neon"1);
                                    
SetPVarInt(playerid"white"CreateObject(18652,0,0,0,0,0,0));
                                    
SetPVarInt(playerid"white1"CreateObject(18652,0,0,0,0,0,0));
                                    
AttachObjectToVehicle(GetPVarInt(playerid"white"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                                    
AttachObjectToVehicle(GetPVarInt(playerid"white1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                                    
GameTextForPlayer(playerid"~w~White~w~ Neon has been added to your vehicle",3500,5);
                                }
                                else if(
strcmp(x_job,"pink",true) == 0)
                                {
                                    if(
Neon[playerid] < 0){return 1;}
                                    
SetPVarInt(playerid"neon"1);
                                    
SetPVarInt(playerid"pink"CreateObject(18651,0,0,0,0,0,0));
                                    
SetPVarInt(playerid"pink1"CreateObject(18651,0,0,0,0,0,0));
                                    
AttachObjectToVehicle(GetPVarInt(playerid"pink"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                                    
AttachObjectToVehicle(GetPVarInt(playerid"pink1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                                    
GameTextForPlayer(playerid"~p~Pink~w~ Neon has been added to your vehicle",3500,5);
                                }
                                else if(
strcmp(x_job,"green",true) == 0)
                                {
                                    if(
Neon[playerid] < 0){return 1;}
                                    
SetPVarInt(playerid"neon"1);
                                    
SetPVarInt(playerid"green"CreateObject(18649,0,0,0,0,0,0));
                                    
SetPVarInt(playerid"green1"CreateObject(18649,0,0,0,0,0,0));
                                    
AttachObjectToVehicle(GetPVarInt(playerid"green"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                                    
AttachObjectToVehicle(GetPVarInt(playerid"green1"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                                    
GameTextForPlayer(playerid"~g~Green ~w~Neon has been added to your vehicle",3500,5);
                                }
                                else if(
strcmp(x_job,"takeoff",true) == 0)
                                {
                                     
DestroyObject(GetPVarInt(playerid"blue"));
                                      
DeletePVar(playerid"neon");
                                    
DestroyObject(GetPVarInt(playerid"blue1"));
                                    
DeletePVar(playerid"neon");
                                    
//
                                    
DestroyObject(GetPVarInt(playerid"red"));
                                    
DeletePVar(playerid"neon");
                                    
DestroyObject(GetPVarInt(playerid"red1"));
                                    
DeletePVar(playerid"neon");
                                    
//
                                    
DestroyObject(GetPVarInt(playerid"green"));
                                    
DeletePVar(playerid"neon");
                                    
DestroyObject(GetPVarInt(playerid"green1"));
                                    
DeletePVar(playerid"neon");
                                    
//
                                    
DestroyObject(GetPVarInt(playerid"yellow"));
                                    
DeletePVar(playerid"neon");
                                    
DestroyObject(GetPVarInt(playerid"yellow1"));
                                    
DeletePVar(playerid"neon");
                                    
//
                                    
DestroyObject(GetPVarInt(playerid"white"));
                                    
DeletePVar(playerid"neon");
                                    
DestroyObject(GetPVarInt(playerid"white1"));
                                    
DeletePVar(playerid"neon");
                                    
//
                                    
DestroyObject(GetPVarInt(playerid"pink"));
                                    
DeletePVar(playerid"neon");
                                    
DestroyObject(GetPVarInt(playerid"pink1"));
                                     
DeletePVar(playerid"neon");
                                    
                                                                }
                          }
                          return 
1;
                    } 
Reply


Messages In This Thread
Neon Problem - by Akcent_Voltaj - 17.04.2013, 11:37
Re: Neon Problem - by DaRk_RaiN - 17.04.2013, 11:46
Re: Neon Problem - by HurtLocker - 17.04.2013, 11:54
Re: Neon Problem - by Akcent_Voltaj - 17.04.2013, 12:17
Re: Neon Problem - by Akcent_Voltaj - 17.04.2013, 13:05
Re: Neon Problem - by Akcent_Voltaj - 17.04.2013, 13:24
Re: Neon Problem - by kalanerik99 - 17.04.2013, 14:05
Re: Neon Problem - by Akcent_Voltaj - 17.04.2013, 14:57
Re: Neon Problem - by HurtLocker - 17.04.2013, 15:33
Re: Neon Problem - by Pottus - 17.04.2013, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)