checkseatbelt cmd error! (conflict errors)
#1

du herro everyone i need someboooody who can herp me with a probrem that i have todai, right now!

pawn Код:
dcmd_checkbelt(playerid, params[])
{
        new tname[MAX_PLAYER_NAME];
        new ID;
    if(gTeam[playerid] != TEAM_COP)
    {
           SendClientMessage(playerid, -1, "you're not a cop");
           return 1;
        }
        if(sscanf(params,"us[100]",ID))
        {
            SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /checkbelt (Playername)");
            return 1;
        }
        if(!IsPlayerConnected(ID))
        {
            format(string,sizeof(string),"[ERROR] The player ID you entered is not connected to the server.");
            SendClientMessage(playerid,COLOR_RED,string);
            return 1;
        }
    new Float:x, Float:y, Float:z;
    GetPlayerPos(ID, x, y, z);
        GetPlayerName(ID,tname,sizeof(tname));
    if(PlayerToPoint(6.0, playerid, x, y, z) && Seatbelt[ID] == 1)
    {
        format(string, sizeof(string), "%s is wearing their seatbelt", PlayerName);
        SendClientMessage(playerid, COLOR_GREEN, string);
        return 1;
    }
    else if(PlayerToPoint(6.0, playerid, x, y, z) && Seatbelt[ID] == 0)
    {
        format(string, sizeof(string), "%s is not wearing their seatbelt", PlayerName);
        SendClientMessage(playerid, COLOR_GREEN, string);
        return 1;
    }
    else
    {
        SendClientMessage(playerid, COLOR_CORAL, "You are not near that player");
        return 1;
    }
    return 1;
}
Is this cmd correct? The errors that I got is not related with the command! It's just random errors.
Reply
#2

Would you mind posting the error codes and on which lines they are? Takes lot of more time to look at the whole of your code.

So far seen this incorrect.

pawn Код:
if(sscanf(params,"u",ID)) // no need to check for string
{
      SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /checkbelt (id)");
      return 1;
}
Reply
#3

pawn Код:
if(sscanf(params,"u",ID))
        {
            SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /checkbelt (Player ID/Part of Name)");
            return 1;
        }
Not
pawn Код:
if(sscanf(params,"us[100]",ID))
        {
            SendClientMessage(playerid,COLOR_ERROR,"[USAGE] /checkbelt (Playername)");
            return 1;
        }
Reply
#4

Thanks for the response guys, but there are still errors (NOT RELATED, just conflict and random errors!)

I believe its from here!

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[250];
    format(string, sizeof(string), "You are entering Vehicle ID %i - Type /engine to start the vehicle's ignition!",vehicleid);
    SendClientMessage(playerid, 0xFFFFFFFF, string);
    //--------------//
    if(ispassenger == 0)
        {
                SetTimerEx("VehicleDamageToPlayerHealth",200,1,"ii",playerid, vehicleid);
                return 1;
        }
        else
        {
                SetTimerEx("VehicleDamageToPlayerHealth2",200,1,"ii",playerid, vehicleid);
                return 1;
}
Reply
#5

Show us your errors, we can't predict what errors you are getting dude.
Show us errors, and on what lines.
It shows you: Error number, also (Line).
Reply
#6

Alright, okay

Quote:

C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1762) : error 017: undefined symbol "GetDayName"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1841) : error 017: undefined symbol "GetPlayer2DZone"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1863) : error 017: undefined symbol "GetWeaponModel"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(187 : error 017: undefined symbol "GetWeaponModel"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1893) : error 017: undefined symbol "GetWeaponModel"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(190 : error 017: undefined symbol "GetWeaponModel"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1944) : error 017: undefined symbol "GetVehicleSpeed"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1946) : error 017: undefined symbol "GetVehicleSpeed"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(1947) : error 017: undefined symbol "ModifyVehicleSpeed"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(3854) : error 017: undefined symbol "UcideMasinileBoule"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(3857) : error 004: function "terminarMission" is not implemented
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(3862) : error 004: function "terminarMission2" is not implemented
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(3877) : error 017: undefined symbol "ReturnPlayerName"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(3887) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4072) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4082) : error 017: undefined symbol "ReturnPlayerName"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4090) : error 017: undefined symbol "ReturnPlayerName"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4115) : error 017: undefined symbol "MissionIni2"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4116) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4125) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4134) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4143) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4154) : error 017: undefined symbol "HideDraw"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4172) : error 017: undefined symbol "Announce"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(4180) : error 017: undefined symbol "SendRadioMessageToCops"
C:\Users\USER\Desktop\Street Kings Server\gamemodes\CNR.pwn(419 : error 017: undefined symbol "Announce"

1. format(daystring, sizeof (daystring), "%s",GetDayName());

2. GetPlayer2DZone(i, zone, MAX_ZONE_NAME);

3. SetPlayerAttachedObject(playerid,0,GetWeaponModel( weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);

4. SetPlayerAttachedObject(playerid,1,GetWeaponModel( weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);

5. SetPlayerAttachedObject(playerid,2,GetWeaponModel( weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);

6. SetPlayerAttachedObject(playerid,3,GetWeaponModel( weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);

7. if(a == 8 && GetVehicleSpeed(GetPlayerVehicleID(playerid), 0) > Speedlimit[playerid])
Reply
#7

I'm telling u guys this is not a TROLL. I got a -rep from a guy who says in it ''plz dont troll the blabla asking for help'' THIS IS NOT TROLL.
Reply
#8

You have to get those functions. The errors are saying that you don't have those functions defined in your script. You might be missing includes. I found the include for the 1st function that is undefined.

https://sampforum.blast.hk/showthread.php?tid=437328

So check if you have includes which you need, properly defined.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)