[HELP]Command
#1

Quote:

YCMDokaziparicnik(playerid, params[], help)
{
#pragma unused help
new id, string[128], name[MAX_PLAYER_NAME];
if(sscanf(params,"u", id)) return SendClientMessage(playerid,-1,"INFO:: /pokaziparicnik [ID/Ime na Igrac]");
else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Pogresan ID.");
else
{
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string),"Igrac %s ima $%i.",name,GetPlayerMoney(playerid));
SendClientMessage(id,-1,string);
SendClientMessage(playerid,-1,"Pokazao si paricnik!");
}
return 1;
}

can you give me this cmd to strcmp y don't use CMD:...
Reply
#2

pawn Код:
if(!strcmp(cmdtext, "/okaziparicnik", true, 41))
{
    new
        id,
        string[128],
        name[MAX_PLAYER_NAME];

    if(sscanf(params,"u", id)) return SendClientMessage(playerid,-1,"INFO:: /pokaziparicnik [ID/Ime na Igrac]");
    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"Pogresan ID.");
    else
    {
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string),"Igrac %s ima $%i.",name,GetPlayerMoney(playerid));
        SendClientMessage(id,-1,string);
        SendClientMessage(playerid,-1,"Pokazao si paricnik!");
    }
    return 1;
}
Reply
#3

EROR :@@
[/QUOTE]C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (6572) : warning 204: symbol is assigned a value that is never used: "tmpcar"
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9754) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9757) : error 017: undefined symbol "params"
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9860) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9872) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9881) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9886) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9893) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9904) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (993 : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9941) : warning 217: loose indentation
C:\Users\Next\Desktop\moj\gamemodes\DREAMWORLD.pwn (9987) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
[/QUOTE]
Reply
#4

Where did you placed it?
Reply
#5

in gm , OnPlayerCOmmandtext
Reply
#6

If you OnPlayerCommandText isn't big. Post it here, probably there are some fails in it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)