zcmd, unknown command?
#1

hey everyone,

i made 2 of this cmds, both same, but i thought at first one i thought, maybe its cuz of the 20 in it, so i made the other cmd with "nitro" but still not working..

pawn Код:
CMD:nitro(playerid, params[])
{
    new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInNosVehicle(playerid))
    {
        for( new i; i<sizeof(CarData); i++ )
        {
                x = CarData[i][Nos_x];
                y = CarData[i][Nos_y];
                z = CarData[i][Nos_z];
                rx = CarData[i][Nos_rx];
                ry = CarData[i][Nos_ry];
                rz = CarData[i][Nos_rz];
                return 0;
        }
        switch(vehicleid)
        {
            case 411:
            {
                PlayerInfo[playerid][SpecialNos] = CreateObject( 1010, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0 );
                AttachObjectToVehicle( GetPlayerVehicleID(playerid), PlayerInfo[playerid][SpecialNos], x, y, z, rx, ry, rz );
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_RED, "ERROR: there is no Special N20 bottle available for this vehicle");
    return 1;
}
CMD:n20(playerid, params[])
{
    new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInNosVehicle(playerid))
    {
        for( new i; i<sizeof(CarData); i++ )
        {
                x = CarData[i][Nos_x];
                y = CarData[i][Nos_y];
                z = CarData[i][Nos_z];
                rx = CarData[i][Nos_rx];
                ry = CarData[i][Nos_ry];
                rz = CarData[i][Nos_rz];
                return 0;
        }
        switch(vehicleid)
        {
            case 411:
            {
                PlayerInfo[playerid][SpecialNos] = CreateObject( 1010, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0 );
                AttachObjectToVehicle( GetPlayerVehicleID(playerid), PlayerInfo[playerid][SpecialNos], x, y, z, rx, ry, rz );
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_RED, "ERROR: there is no Special N20 bottle available for this vehicle");
    return 1;
}
commands are both the same, but that doesnt matters right?

when i use 1 of those 2 cmds in game, it says SERVER: unknown command.

and i dont know wuts wrong with this

any help would be very appreciated

greets niels
Reply
#2

Are you saying one works, but the other doesn't?
Reply
#3

no, both dont work
Reply
#4

PHP код:
for( new ii<sizeof(CarData); i++ )
        {
                
CarData[i][Nos_x];
                
CarData[i][Nos_y];
                
CarData[i][Nos_z];
                
rx CarData[i][Nos_rx];
                
ry CarData[i][Nos_ry];
                
rz CarData[i][Nos_rz];
                return 
0
Remove the return 0; and try.
Reply
#5

Add zcmd in Pawno > Include(s)
Reply
#6

Quote:
Originally Posted by GordonP
Посмотреть сообщение
Add zcmd in Pawno > Include(s)
You gotta be joking man, there was no error saying that he needs to include it.
Reply
#7

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
You gotta be joking man, there was no error saying that he needs to include it.
fact, and im not that noobie to NOT include that, if you see my rep and posts, you know i dont make such a noobie mistake -_-
Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
PHP код:
for( new ii<sizeof(CarData); i++ )
        {
                
CarData[i][Nos_x];
                
CarData[i][Nos_y];
                
CarData[i][Nos_z];
                
rx CarData[i][Nos_rx];
                
ry CarData[i][Nos_ry];
                
rz CarData[i][Nos_rz];
                return 
0
Remove the return 0; and try.
imma try it thnx
Reply
#8

hmm ok i now have this, and it doesnt says, unknown cmd anymore, but it doesnt attaches the object to the vehicle either

pawn Код:
CMD:nitro(playerid, params[])
{
    new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInNosVehicle(playerid))
    {
        for( new i; i<sizeof(CarData); i++ )
        {
                x = CarData[i][Nos_x];
                y = CarData[i][Nos_y];
                z = CarData[i][Nos_z];
                rx = CarData[i][Nos_rx];
                ry = CarData[i][Nos_ry];
                rz = CarData[i][Nos_rz];
        }
        switch(vehicleid)
        {
            case 411:
            {
                PlayerInfo[playerid][SpecialNos] = CreateObject( 1010, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0 );
                AttachObjectToVehicle( GetPlayerVehicleID(playerid), PlayerInfo[playerid][SpecialNos], x, y, z, rx, ry, rz );
            }
        }
    }
    else return SendClientMessage(playerid, COLOR_RED, "ERROR: there is no Special N20 bottle available for this vehicle");
    return 1;
}
anyone sees the problem here?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)