Jump to content
  • 0

Zcmd


Diabolik

Question

11 answers to this question

Recommended Posts

Am incercat dar cand le pun si dau compilare si intru pe server nu merg comenziile.

pai man

Nu lesi comenzile la

[pawn]OnPlayerCommandText[/pawn]

Le pui undeva jos in script asa

[pawn]CMD:comanda(playerid,params[]);

{

//Comanda

return 1;

}[/pawn]

Massari e curva mea

Link to comment
Share on other sites

Ok stai sa vad ce imi iese  si dau EDIT>

Tot nu merge:

imi da erorile astea:

C:\Documents and Settings\BogdaneL\My Documents\sa-mp\Stunt GameSpeed\gamemodes\gsp.pwn(718) : error 017: undefined symbol "comanda"
C:\Documents and Settings\BogdaneL\My Documents\sa-mp\Stunt GameSpeed\gamemodes\gsp.pwn(718) : error 033: array must be indexed (variable "-unknown-")
C:\Documents and Settings\BogdaneL\My Documents\sa-mp\Stunt GameSpeed\gamemodes\gsp.pwn(718) : error 029: invalid expression, assumed zero
C:\Documents and Settings\BogdaneL\My Documents\sa-mp\Stunt GameSpeed\gamemodes\gsp.pwn(718) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Link to comment
Share on other sites

Imi da un warning:

C:\Documents and Settings\BogdaneL\My Documents\sa-mp\Stunt GameSpeed\gamemodes\gsp.pwn(931) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

Linia 391:
new vehicleid = GetPlayerVehicleID(vehicleid);
Tot:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new
        pos,
        funcname[32];
    while (cmdtext[++pos] > ' ')
    {
        funcname[pos-1] = tolower(cmdtext[pos]);
    }
    format(funcname, sizeof(funcname), "cmd_%s", funcname);
    while (cmdtext[pos] == ' ') pos++;
    if (!cmdtext[pos])
    {
        return CallLocalFunction(funcname, "is", playerid, "\1");
    }
    return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]);
new vehicleid = GetPlayerVehicleID(vehicleid);
if(strcmp(cmdtext,"/carcolor black",true)==0)
{
ChangeVehicleColor(GetPlayerVehicleID(vehicleid), 0, 0);
return 1;
}

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Link to comment
Share on other sites

[pawn]public OnPlayerCommandText(playerid, cmdtext[])

{

    //comenzi

    //comenzi

    new

        pos,

        funcname[32];

    while (cmdtext[++pos] > ' ')

    {

        funcname[pos-1] = tolower(cmdtext[pos]);

    }

    format(funcname, sizeof(funcname), "cmd_%s", funcname);

    while (cmdtext[pos] == ' ') pos++;

    if (!cmdtext[pos])

    {

        return CallLocalFunction(funcname, "is", playerid, "\1");

    }

    return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]);

}[/pawn]

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

Link to comment
Share on other sites

Ce-i greu?

De exemplu, comanda:

if ( strcmp( cmdtext, "/killnoobs", true ) == 10 )
{
    SetPlayerHealth( playerid, 0 );
    SendClientMessage( playerid, ~1, "I kill you, noob!" );
    return 1;
}
in ZCMD va fi:
[code]
CMD:killnoobs( playerid, params[ ] )
{
    SetPlayerHealth( playerid, 0 );
    SendClientMessage( playerid, ~1, "I kill you, noob!" );
    return 1;
}

+ ca comenzile in ZCMD trebuie sa fie in afara oricarui callback.

Fara reclama in semnatura!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.