Commands in my server do not read while in-game neither does LuX Admin
#1

well I need help, when I compile I have 0 errors, but when I go ingame the commands don't work, does it need to be ZCMD, cause if it does can you guys help me with it, cause when i turn it into zcmd I get lots of errors
pawn Код:
// GAMEMODE MADE BY ROCKINGCAMMAN AND EPRO

#include <a_samp>
#include <core>
#include <dini>
#include <float>
#include <colors>
#include <zcmd>
#include <ztccolors>
#include <F_Streamer>
#include <sscanf2>
#include <md5>
#include <ladmin>
#include <ldudb>
#include <lfuncs>

#pragma unused ret_memcpy
#pragma unused cmd_help
#pragma unused split

//Colors
#define WHITE 0xFFFFFFFF
#define COLOR_UNEMD 0x99CEFFFF
#define COLOR_ORANGE 0xffcc00FF
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GREEN 0x33AA33AA
#define COLOR_USAGE 0xEFEFF7AA
#define COLOR_BASIC 0x0066FFAA
#define COLOR_RED 0xAA3333AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_SPAWN 0xFF8C55FF
#define COLOR_ADMIN 0xFF0000FF
#define COLOR_SAY 0x2986CEFF
#define COLOR_SYSGREY 0xC6BEBDFF
#define COLOR_BLACK 0x000000FF
#define COLOR_JOIN 0x74E80099
#define COLOR_WARN 0xBE615099
#define COLOR_RACE 0x00BBBB99
#define COLOR_KRED 0xFF0000FF
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_FADE1 0xFFFFFFFF
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E

// News
new Float:saveX[MAX_PLAYERS],Float:saveY[MAX_PLAYERS],Float:saveZ[MAX_PLAYERS];

// Define Teams

// Define Factions
// Team 1 - Sheriff's Department
// Team 2 - FBI
// Team 3 - Public Works

// Define Textdraw
new Text:Textdraw0;
new Text:Textdraw1;

//Information Icons: (pickups)
new Info[21];

#if defined FILTERSCRIPT
#else
main()
{
    print("\n----------------------------------");
    print(" RealityC Roleplay Custom Scripted");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Teams
    SetTeamCount( 0 );
    SetTeamCount( 1 );
    SetTeamCount( 2 );
    // Team Count
   
    SetGameModeText("RC-RP V.1");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    ////////////////////////TextDraws///////////////////////////////////////////////
    Textdraw0 = TextDrawCreate(12.000000, 426.000000, "RealityC Roleplay");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 3);
    TextDrawLetterSize(Textdraw0, 0.539999, 2.200000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);

    Textdraw1 = TextDrawCreate(480.000000, 424.000000, "78.133.12.111:7744");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 3);
    TextDrawLetterSize(Textdraw1, 0.500000, 2.399999);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 0);
    TextDrawSetProportional(Textdraw1, 1);
    TextDrawSetShadow(Textdraw1, 1);
    //////////////////////////////////////////////////////////////////
    UsePlayerPedAnims();
    EnableStuntBonusForAll(0);
    DisableInteriorEnterExits();
    // Information Pickups
    Info[0] = CreatePickup(1239, 23,  -90.5412,1118.7378,20.7860); // Mechanic
    Info[1] = CreatePickup(1239, 23,  -168.4577,1169.1127,19.7500); // Arms Dealer
    Info[2] = CreatePickup(1318, 23,  -217.2829,979.4031,19.5015); // Sheriff's Depo
    Info[3] = CreatePickup(1318, 23,  -180.3768,1132.9747,19.7422); // Sheriff's Depo
    // End of Pickups
   
    // Objects and Vehicles
    AddStaticVehicle(562,-135.36340332,1217.97473145,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(562,-138.10774231,1217.80004883,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(562,-141.10137939,1217.60937500,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(562,-144.34403992,1217.40307617,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(562,-148.08619690,1217.16430664,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(562,-151.57888794,1216.94189453,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(562,-155.07107544,1216.71923828,19.49573708,0.00000000,-1,-1); //Elegy
    AddStaticVehicle(552,-81.45268250,1130.91918945,19.51909637,0.00000000,-1,-1); //Utility
    AddStaticVehicle(552,-85.23230743,1130.76721191,19.51909637,0.00000000,-1,-1); //Utility
    AddStaticVehicle(555,-147.38174438,1134.24023438,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-143.88085938,1134.25732422,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-140.38085938,1134.27392578,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-137.13085938,1134.28930664,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-137.10192871,1128.28906250,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-140.35192871,1128.27319336,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-143.85156250,1128.25537109,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(555,-147.35156250,1128.23779297,19.52256203,0.00000000,-1,-1); //Windsor
    AddStaticVehicle(598,-210.59938049,999.08337402,19.47738838,92.00000000,-1,-1); //Police Car (LVPD)
    AddStaticVehicle(598,-210.62164307,995.83300781,19.47738838,91.99951172,-1,-1); //Police Car (LVPD)
    AddStaticVehicle(598,-210.39764404,992.08123779,19.47738838,91.99951172,-1,-1); //Police Car (LVPD)
    AddStaticVehicle(598,-210.42950439,987.58123779,19.47738838,91.99951172,-1,-1); //Police Car (LVPD)
    AddStaticVehicle(420,-164.76141357,1011.73345947,19.59218788,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-164.66790771,1014.98181152,19.59218788,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-164.56701660,1018.47973633,19.59218788,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-164.44500732,1022.72741699,19.59218788,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-173.74037170,1021.24163818,19.59218788,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-173.83306885,1017.99279785,19.59172058,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-173.93298340,1014.49389648,19.59172058,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(420,-174.03259277,1010.99487305,19.59172058,90.00000000,-1,-1); //Taxi
    AddStaticVehicle(416,-301.32745361,1011.81256104,19.89332581,268.00000000,-1,-1); //Ambulance
    AddStaticVehicle(416,-301.60449219,1015.80273438,19.89332581,267.99499512,-1,-1); //Ambulance
    AddStaticVehicle(416,-301.88183594,1019.79296875,19.89332581,267.99499512,-1,-1); //Ambulance
    AddStaticVehicle(416,-302.12451172,1023.28442383,19.89332581,267.99499512,-1,-1); //Ambulance
    AddStaticVehicle(416,-302.43603516,1027.77319336,19.89332581,267.99499512,-1,-1); //Ambulance
    AddStaticVehicle(407,-330.48910522,1063.11279297,20.11218834,268.00000000,-1,-1); //Firetruck
    F_CreateObject(3749,-2909.09057617,-53.19431686,7.66187763,0.00000000,0.00000000,90.00000000); //object(clubgate01_lax) (1)
    F_CreateObject(3403,-83.11845398,1132.47290039,20.80058670,0.00000000,2.00000000,0.00000000); //object(sw_logcover) (1)
    F_CreateObject(9247,-100.91419220,1134.77551270,25.55333710,0.00000000,0.00000000,0.00000000); //object(hrbrmstr_sfn01) (1)
    F_CreateObject(3749,-104.87460327,1148.78393555,24.60060120,0.00000000,0.00000000,90.00000000); //object(clubgate01_lax) (3)
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 2426.8420, 1821.9703, 16.3222);
    SetPlayerCameraPos(playerid, 2422.4617, 1821.9310, 17.2204);
    SetPlayerCameraLookAt(playerid, 2426.8420, 1821.9703, 16.3222);
    SetPlayerFacingAngle(playerid, 92.0174);
    return 1;
}

public OnPlayerConnect(playerid)
{
    SetPlayerCameraPos(playerid, 1698.2495, 2464.7241, 80.1933);
    SetPlayerCameraLookAt(playerid, 1614.8538, 2304.3838, 10.8203);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, -178.2346,1110.9937,19.7422);
    SendClientMessage(playerid,COLOR_YELLOW,"If you need help please use /n (question)");
    SetPlayerTeam(playerid, 0);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/enter", true)==0)
    {
        if(IsPlayerInRangeOfPoint(playerid,5.0,-180.3768,1132.9747,19.7422))
        {
            GetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
            SetPlayerPos(playerid,2315.952880,-1.618174,26.742187);
            SetPlayerInterior(playerid, 0);
        }
       
        if(IsPlayerInRangeOfPoint(playerid,5.0,-217.2829,979.4031,19.5015))
        {
            GetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
            SetPlayerPos(playerid,246.375991, 109.245994, 1003.218750);
            SetPlayerInterior(playerid, 10);
        }
        return 1;
    }
    if(strcmp(cmdtext,"/exit", true)==0)
    {
        SetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
        SetPlayerInterior(playerid, 0);
        return 1;
    }

    if(!strcmp(cmdtext, "/me", true, 3)) // 3 is the length of /me
    {
    if(!cmdtext[3])
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
    {
    new string[128];
    GetPlayerName(playerid, string, sizeof(string));
    format(string, sizeof(string), "* %s %s", string, cmdtext[4]);
    }
    return 1;
    }
   
    if(!strcmp(cmdtext, "/do", true, 3)) // 3 is the length of /me
    {
    if(!cmdtext[3])
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /do [action]");
    {
    new string[128];
    GetPlayerName(playerid, string, sizeof(string));
    format(string, sizeof(string), "(( %s ))* %s", string, cmdtext[4]);
    }
    return 1;
    }
    return 0;
}


// OnPlayerZCMDText -- CUSTOM MADE // THINGY!!! LOL!
// COMMANDS FROM SCRIPT
    // Custom Made Job System
    COMMAND:joinmech(playerid, params[])
        {
        SetPlayerTeam(playerid, 1);
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Congratulations","Your commands are /fix, /repair, /addnos and /duty","Okay","");
        return 1;
        }
// Mechanic Job -- Custom Scripted by RockingCamman
    COMMAND:dutymech(playerid, params[])
        {
        if(GetPlayerTeam(playerid) == 1)
        {
        SendClientMessageToAll(COLOR_YELLOW,"A Player is on Duty for Mechanic, please do /call 411 for help!");
        }
        else SendClientMessage(playerid, COLOR_YELLOW,"ERROR: You are not a mechanic");
        return 1;
        }
    /* Out of Character */
    COMMAND:ooc(playerid, params[])
        {
        new sendername[MAX_PLAYER_NAME], string[56];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /ooc [text]");
        format(string, sizeof(string), " %s:(( %s ))", sendername, params);
        SendClientMessageToAll(COLOR_WHITE, string);
        return 1;
        }
    COMMAND:o(playerid, params[])
        {
        return cmd_ooc(playerid, params);
        }
       
    COMMAND:b(playerid, params[])
        {
        new sendername[MAX_PLAYER_NAME], string[56];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /b [text]");
        format(string, sizeof(string), "(( %s: %s ))", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        return 1;
        }
        // End of Out of Character
    COMMAND:pay(playerid, params[])
        {
        new otherid, cash;
        if (sscanf(params, "dd", otherid, cash)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /pay [ID] [Cash]");
        else
        {
        if(GetPlayerMoney(playerid) > cash) SendClientMessage(playerid, COLOR_RED, "You don't have that much!");
        else if(!IsPlayerConnected(otherid)) SendClientMessage(playerid, COLOR_RED, "That PlayerID is not connected!");
        else if(otherid == playerid) SendClientMessage(playerid, COLOR_RED, "It is pointless to pay yourself..");
        else
            {
            GivePlayerMoney(playerid, -cash);
            GivePlayerMoney(otherid, cash);
            }
        }
        return 1;
    }

 // Me and Do

   // A Command that has to be last -- DO NOT MOVE!
    COMMAND:help(playerid, params[])
    {
    if(IsPlayerVipMember(playerid))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: HELP :: /o (out of character), /b (local ooc), /n (question)");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: /pay /charity /time /buy /unrentcar /unrentbike /switchkey /id /drink /clothes /doro /wo /knock /doorshout /resetspawn");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: /licenses /showlicenses(/sl) /report /animlist /stopanim /fuel /use");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: /usedrugs /contract /admins (/f)actionlist /fightstyle");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: (/wi)ndows /coin /trunk /smoke /(sur)render");
        SendClientMessage(playerid, COLOR_YELLOW,":: CHAT :: (/o)oc /me /(ad)vertise (/s)hout /(w)hisper /do");
        SendClientMessage(playerid, COLOR_YELLOW,":: BANK :: /withdraw /deposit");
        }
    if(IsPlayerVipType(playerid,1))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: SAPD :: None! Will be created soon!");
        }
    if(IsPlayerVipType(playerid,2))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: FBI :: None! Will be created soon!");
        }
    if(IsPlayerVipType(playerid,2))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: PUBLIC WORKS :: None! Will be created soon!");
        }
    if(GetPlayerTeam(playerid) == 1)
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: MECHANIC :: /duty, /fixed, /addnos");
        return 1;
        }
    return 0;
  }

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Notice","Welcome to RealityC Roleplay, click Okay to continue!","Okay","");
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == Info[0])
    {
        GameTextForPlayer(playerid,"~g~JOB:~n~~w~Type /joinmech to be a Mechanic",5000,3);
        PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
    }
    if (pickupid == Info[1])
    {
        GameTextForPlayer(playerid,"~g~Info:~n~~w~Type /joindealer to be an Arms Dealer",5000,3);
        PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
    }
    if (pickupid == Info[2])
    {
        GameTextForPlayer(playerid,"~g~Info:~n~~w~Welcome to the Sheriff's Department",5000,3);
        PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
    }
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 1)
    {
        ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"TUTORIAL SLIDE 1","Definitions of DM, ETC\nDM stands for Deathmatch\nRK stands for Revenge Killing\nCR stands for Chicken Running\nMG stands for Metagaming\nMixing is when you mix IC with OOC\nIC stands for In Character\nOOC stands for Out of Character","Okay","");
    }
    if (dialogid == 2)
    {
        ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"TUTORIAL SLIDE 2","If you ask to be administrator or a type of faction,\nYour chances will be decreased","Okay","");
    }
    if (dialogid == 3)
    {
        ShowPlayerDialog(playerid,4,DIALOG_STYLE_MSGBOX,"TUTORIAL SLIDE 3","Please register at our site at\nwww.realityc-rp.proboards.com/","Okay","Cancel");
    }
    if(dialogid == 4 && response == 4)
{
    if(inputtext[0] == '1') {
        SetPlayerPos(playerid, -178.2346,1110.9937,19.7422);
        SendClientMessage(playerid,0xAA3333AA,"Have fun!");
    }
    else if(inputtext[0] == '2') {
        SetPlayerPos(playerid, -178.2346,1110.9937,19.7422);
        SendClientMessage(playerid,0xAA3333AA,"Have fun anyways!!!!");
        }
    return 1;
    }
    return 0;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Also LuX Admin doesn't read either
Reply
#2

Place the ZCMD commands outside a callback (Just the bottom of your script)
Reply
#3

For your commands you shouldn't use:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/yourcommand", true)==0)
    {
       //Functions
    }
}
But use zcmd instead:
pawn Код:
COMMAND:yourcommand(playerid, params[])
{
  //Functions
}
Reply
#4

pawn Код:
//----------------------------------ZCMD------------------------------------------
COMMAND:joinmech(playerid, params[])
        {
        SetPlayerTeam(playerid, 1);
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Congratulations","Your commands are /fix, /repair, /addnos and /duty","Okay","");
        return 1;
        }
//---------------------------END OF JOIN JOB--------------------------------------
//------------------Enter and Exit, OOC and IC------------------------------------
    COMMAND:enter(playerid, params[])
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,-180.3768,1132.9747,19.7422))
        {
            GetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
            SetPlayerPos(playerid,2315.952880,-1.618174,26.742187);
            SetPlayerInterior(playerid, 0);
        }

        if(IsPlayerInRangeOfPoint(playerid,5.0,-217.2829,979.4031,19.5015))
        {
            GetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
            SetPlayerPos(playerid,246.375991, 109.245994, 1003.218750);
            SetPlayerInterior(playerid, 10);
        }
    }
    COMMAND:exit(playerid, params[])
    {
        SetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
        SetPlayerInterior(playerid, 0);
    }
   
    COMMAND:me(playerid, params[])
    {
    if(!cmdtext[3]);
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
    {
    new string[128];
    GetPlayerName(playerid, string, sizeof(string));
    format(string, sizeof(string), "* %s %s", string, cmdtext[4]);
    }
   
    COMMAND:do(playerid, params[])
    {
    if(!cmdtext[3])
    SendClientMessage(playerid, 0xFF0000FF, "USAGE: /do [action]");
    {
    new string[128];
    GetPlayerName(playerid, string, sizeof(string));
    format(string, sizeof(string), "(( %s ))* %s", string, cmdtext[4]);
    }
// Mechanic Job -- Custom Scripted by RockingCamman
    COMMAND:dutymech(playerid, params[])
        {
        if(GetPlayerTeam(playerid) == 1)
        {
        SendClientMessageToAll(COLOR_YELLOW,"A Player is on Duty for Mechanic, please do /call 411 for help!");
        }
        else SendClientMessage(playerid, COLOR_YELLOW,"ERROR: You are not a mechanic");
        return 1;
        }
    /* Out of Character */
    COMMAND:ooc(playerid, params[])
        {
        new sendername[MAX_PLAYER_NAME], string[56];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /ooc [text]");
        format(string, sizeof(string), " %s:(( %s ))", sendername, params);
        SendClientMessageToAll(COLOR_WHITE, string);
        return 1;
        }
    COMMAND:o(playerid, params[])
        {
        return cmd_ooc(playerid, params);
        }

    COMMAND:b(playerid, params[])
        {
        new sendername[MAX_PLAYER_NAME], string[56];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /b [text]");
        format(string, sizeof(string), "(( %s: %s ))", sendername, params);
        SendClientMessageToAll(COLOR_GREY, string);
        return 1;
        }
        // End of Out of Character
    COMMAND:pay(playerid, params[])
        {
        new otherid, cash;
        if (sscanf(params, "dd", otherid, cash)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /pay [ID] [Cash]");
        else
        {
        if(GetPlayerMoney(playerid) > cash) SendClientMessage(playerid, COLOR_RED, "You don't have that much!");
        else if(!IsPlayerConnected(otherid)) SendClientMessage(playerid, COLOR_RED, "That PlayerID is not connected!");
        else if(otherid == playerid) SendClientMessage(playerid, COLOR_RED, "It is pointless to pay yourself..");
        else
            {
            GivePlayerMoney(playerid, -cash);
            GivePlayerMoney(otherid, cash);
            }
        }
        return 1;
    }
    COMMAND:help(playerid, params[])
    {
    if(IsPlayerVipMember(playerid))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: HELP :: /o (out of character), /b (local ooc), /n (question)");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: /pay /charity /time /buy /unrentcar /unrentbike /switchkey /id /drink /clothes /doro /wo /knock /doorshout /resetspawn");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: /licenses /showlicenses(/sl) /report /animlist /stopanim /fuel /use");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: /usedrugs /contract /admins (/f)actionlist /fightstyle");
        SendClientMessage(playerid, COLOR_YELLOW,":: GENERAL :: (/wi)ndows /coin /trunk /smoke /(sur)render");
        SendClientMessage(playerid, COLOR_YELLOW,":: CHAT :: (/o)oc /me /(ad)vertise (/s)hout /(w)hisper /do");
        SendClientMessage(playerid, COLOR_YELLOW,":: BANK :: /withdraw /deposit");
        }
    if(IsPlayerVipType(playerid,1))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: SAPD :: None! Will be created soon!");
        }
    if(IsPlayerVipType(playerid,2))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: FBI :: None! Will be created soon!");
        }
    if(IsPlayerVipType(playerid,2))
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: PUBLIC WORKS :: None! Will be created soon!");
        }
    if(GetPlayerTeam(playerid) == 1)
    {
        SendClientMessage(playerid, COLOR_YELLOW,":: MECHANIC :: /duty, /fixed, /addnos");
        return 1;
        }
    return 0;
  }
I made the commands ZCMD but these are the errors I now have

pawn Код:
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(410) : warning 217: loose indentation
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : warning 215: expression has no effect
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : error 029: invalid expression, assumed zero
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : fatal error 107: too many error messages on one line
Reply
#5

pawn Код:
CMD:command(playerid, params[], cmdtext[])
// all these arnt always needed

Use this
Reply
#6

pawn Код:
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(410) : warning 217: loose indentation
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : error 028: invalid subscript (not an array or too many subscripts): "cmdtext"
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : warning 215: expression has no effect
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : error 029: invalid expression, assumed zero
C:\Documents and Settings\RockingCamman\Desktop\Furious Drifters\gamemodes\RCRP.pwn(425) : fatal error 107: too many error messages on one line
tese are my errors now =/
Reply
#7

Would you mind posting what's at line 410 and 425?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)