GivePlayerWeapon...
#1

HI....

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chief186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 275);
        GivePlayerWeapon(playerid, COLOR_GOLD, 42, 10000);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
        return 1;
    }
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chief186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 275);
        GivePlayerWeapon(playerid, COLOR_GOLD, 42, 10000);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
        return 1;
    }
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chief186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 275);
        GivePlayerWeapon(playerid, COLOR_GOLD, 42, 10000);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
        return 1;
    }
got this warn...
Quote:

C:\Documents and Settings\Luca\Desktop\BaseScript\filterscripts\ski ns.pwn(8 : warning 202: number of arguments does not match definition
C:\Documents and Settings\Luca\Desktop\BaseScript\filterscripts\ski ns.pwn(95) : warning 202: number of arguments does not match definition

please help!
Reply
#2

all are the same 0.0
anyway can you show as line 88 and 95.
Reply
#3

GivePlayerWeapon(playerid, COLOR_GOLD, 42, 10000);
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
Reply
#4

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chief186", true) == 0) {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 275);
        GivePlayerWeapon(playerid, 42, 10000);
        SendClientMessage(playerid, COLOR_GOLD,"[INFO]You logged in as BCFD Chief.");
        return 1;
    }
    return 0;
}
Reply
#5

Quote:
Originally Posted by iKeN
Посмотреть сообщение
GivePlayerWeapon(playerid, COLOR_GOLD, 42, 10000);
pawn Код:
GivePlayerWeapon(playerid, weaponid, ammo);
lol?
anyway,the 2nd error/warning:
You have typed:
pawn Код:
if(strcmp(cmdtext, "/chief186", true) == 0) {
it should be:
pawn Код:
if (strcmp("/chief186", cmdtext, true, 10) == 0)
Reply
#6

Quote:
Originally Posted by xkirill
Посмотреть сообщение
lol?
anyway,the 2nd error/warning:
You have typed:
pawn Код:
if(strcmp(cmdtext, "/chief186", true) == 0) {
it should be:
pawn Код:
if (strcmp("/chief186", cmdtext, true, 10) == 0)
that error is talking about?
Код:
C:\Documents and Settings\Luca\Desktop\BaseScript\filterscripts\ski ns.pwn(8 ) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Luca\Desktop\BaseScript\filterscripts\ski ns.pwn(95) : warning 202: number of arguments does not match definition
only says that exceeded the parameters of the function.
and the order I think it gives the same.
pawn Код:
if(strcmp(cmdtext, "/chief186", true) == 0)
https://sampwiki.blast.hk/wiki/Strcmp
Reply
#7

Just like iKeN says: GivePlayerWeapon(playerid, COLOR_GOLD, 42, 10000);

Paste, like this: GivePlayerWeapon(playerid, 42, 10000);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)