Neon object doesnt appear.
#1

Ok so I use /neon, it opens the dialog and let me choose between many colors ( i just pasted the red one as its the same for every other colors ) and then the neon tube ( object ) doesnt appear on car. Any help ?



Heres the code

PHP код:
CMD:neon(playeridparams[])
{
    new 
string[100];
    if(!
IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playeridCOLOR_GREY"You are not allowed to use command.");
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not in a vehicle.");
    if(
GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVeh] && GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVVeh]) return SendClientMessage(playeridCOLOR_GREY"You are not in an owned vehicle.");
    if(
GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh])
    {
        if(
neon[playerid] == 1)
        {
            if(
PlayerInfo[playerid][pNeon] == 0)
            {
                
SendClientMessage(playeridCOLOR_GREY"You don't have neons installed on this vehicle.");
            }
            if(
PlayerInfo[playerid][pNeon] == 1)//red
            
{
                  
SetPVarInt(playerid"neon2"CreateDynamicObject(18647,0,0,0,0,0,0));
                
SetPVarInt(playerid"neon3"CreateDynamicObject(18647,0,0,0,0,0,0));
                 
AttachObjectToVehicle(GetPVarInt(playerid"neon2"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0);
                  
AttachObjectToVehicle(GetPVarInt(playerid"neon3"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0);
                   
format(stringsizeof(string), "* %s pushes a button on his dash and sparks his red neon tubes."RPN(playerid));
                 
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE);
                 
neon[playerid] = 0;
            } 
Thanks a LOT
Reply
#2

Not sure, but a try's free.

PHP код:
CMD:neon(playeridparams[]) 

    new 
string[100]; 
    if(!
IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playeridCOLOR_GREY"You are not allowed to use command."); 
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not in a vehicle."); 
    if(
GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVeh] && GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVVeh]) return SendClientMessage(playeridCOLOR_GREY"You are not in an owned vehicle."); 
    if(
GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh]) 
    { 
        if(
neon[playerid] == 1
        { 
            if(
PlayerInfo[playerid][pNeon] == 0
            { 
                
SendClientMessage(playeridCOLOR_GREY"You don't have neons installed on this vehicle."); 
            } 
            if(
PlayerInfo[playerid][pNeon] == 1)//red 
            

                  new 
Float:xFloat:yFloat:z;
             
GetPlayerPos(playeridxyz);
                  
SetPVarInt(playerid"neon2"CreateDynamicObject(18647,x,y,z,0,0,0)); 
                
SetPVarInt(playerid"neon3"CreateDynamicObject(18647,x,y,z,0,0,0)); 
                 
AttachObjectToVehicle(GetPVarInt(playerid"neon2"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0); 
                  
AttachObjectToVehicle(GetPVarInt(playerid"neon3"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0); 
                   
format(stringsizeof(string), "* %s pushes a button on his dash and sparks his red neon tubes."RPN(playerid)); 
                 
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE); 
                 
neon[playerid] = 0
            } 
Reply
#3

Код:
else if(PlayerInfo[playerid][pNeon] == 1)//red
Reply
#4

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
Not sure, but a try's free.

PHP код:
CMD:neon(playeridparams[]) 

    new 
string[100]; 
    if(!
IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playeridCOLOR_GREY"You are not allowed to use command."); 
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playeridCOLOR_GREY"You are not in a vehicle."); 
    if(
GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVeh] && GetPlayerVehicleID(playerid) != PlayerInfo[playerid][pVVeh]) return SendClientMessage(playeridCOLOR_GREY"You are not in an owned vehicle."); 
    if(
GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pVeh]) 
    { 
        if(
neon[playerid] == 1
        { 
            if(
PlayerInfo[playerid][pNeon] == 0
            { 
                
SendClientMessage(playeridCOLOR_GREY"You don't have neons installed on this vehicle."); 
            } 
            if(
PlayerInfo[playerid][pNeon] == 1)//red 
            

                  new 
Float:xFloat:yFloat:z;
             
GetPlayerPos(playeridxyz);
                  
SetPVarInt(playerid"neon2"CreateDynamicObject(18647,x,y,z,0,0,0)); 
                
SetPVarInt(playerid"neon3"CreateDynamicObject(18647,x,y,z,0,0,0)); 
                 
AttachObjectToVehicle(GetPVarInt(playerid"neon2"), GetPlayerVehicleID(playerid), -0.80.0, -0.700.00.00.0); 
                  
AttachObjectToVehicle(GetPVarInt(playerid"neon3"), GetPlayerVehicleID(playerid), 0.80.0, -0.700.00.00.0); 
                   
format(stringsizeof(string), "* %s pushes a button on his dash and sparks his red neon tubes."RPN(playerid)); 
                 
SendNearbyMessage(playerid15stringCOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLECOLOR_PURPLE); 
                 
neon[playerid] = 0
            } 
You're gonna create the object where the player is...?

EDIT: Didn't mean to double post, thought I was editing my first post.
Reply
#5

They only appear at night.
Reply
#6

Quote:
Originally Posted by -CaRRoT
Посмотреть сообщение
You're gonna create the object where the player is...?

EDIT: Didn't mean to double post, thought I was editing my first post.
Didn't you read that the script only works if player's in vehicle?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)