SA-MP Forums Archive
problem with a command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem with a command (/showthread.php?tid=376996)



problem with a command - UnAngel - 12.09.2012

hey i use zcmd and i want to change this command to zcmd
PHP код:
    if(!strcmp(cmd"/car"true) || !strcmp(cmd"/carr"true))
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
x_v[256];
            
x_v strtok(cmdtextidx);
            if(!
strlen(x_v))
            { 
its make we error the x_v and strlen idont know what i need to change here plase help !!!!


Re: problem with a command - [IKS]Niko_Hs™ - 12.09.2012

to change the command in zcmd :

Код:
CMD:car(playerid,params[])
{
//functions command
return 1;
}

CMD:carr(playerid,params[])
{
cmd_car(playerid, "");
return 1;
}



Re: problem with a command - UnAngel - 12.09.2012

now its says
undefined symbol "cmdtext"
new moneys;
new x_v[256];
x_v = strtok(cmdtext, idx);
if(!strlen(x_v))
{
// SendClientMessage(playerid, WHITE, "USAGE:"COL_WHITE" (/v[ehicle])");
SendClientMessage(playerid, WHITE, "(/v list) (/v buy) (/v park) (/v spawn)");
SendClientMessage(playerid, WHITE, "(/v find) (/v lock) (/v info) (/v offer)");
SendClientMessage(playerid, WHITE, "(/v accept) (/v refuse) (/v sell) (/v givekey)");
SendClientMessage(playerid, WHITE, "(/v alarm) (/v trunk) (/v bonnet) (/v lights)");
//SendClientMessage(playerid, YELLOWH, "offer, accept, refuse, changecolor, sell,givekey");//buylock, buyalarm
return 1;
}