zcmd GetPlayerColor help
#1

Hey guys, the follwing code should give a minigun to a player if he have the colour 0xD8C762FF... I am making this for my cop system... i will need this!
Id what fail here but it give me this error:

Код:
C:\Users\Ricardo\Desktop\copsystem.pwn(16) : error 036: empty statement
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Cop System by Ricardo_Manuel");
    print("--------------------------------------\n");
    return 1;
}

COMMAND:duty(playerid, params[])
{
    if(GetPlayerColor(playerid) == 0xD8C762FF);
    GivePlayerWeapon(playerid, 38, 10000);
    return 1;
}

COMMAND:mycolor(playerid, params[])
{
    SetPlayerColor(playerid, 0xD8C762FF);
    return 1;
}
THANKS!
Reply
#2

I think you're using the "if" statement wrong.

Are you only using police teams? If you planning on adding more team, I suggest you to use "gTeam"
Reply
#3

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Cop System by Ricardo_Manuel");
    print("--------------------------------------\n");
    return 1;
}

COMMAND:duty(playerid, params[])
{
    if(GetPlayerColor(playerid) == 0xD8C762FF)
        return GivePlayerWeapon(playerid, 38, 10000);
    return 1;
}

COMMAND:mycolor(playerid, params[])
{
    SetPlayerColor(playerid, 0xD8C762FF);
    return 1;
}
Reply
#4

nvm i fail
Reply
#5

Thanks man, but by the way, how can i create just 1 rank(cop) than i can do /setrank playerid 1(cop) ? I need to create teams? How?

If this is very hard just show me a code for the some think(only let if player is this color) but to use in other players..

For example, i am blue color, so i can stun someone... Or jail!

I don't know make zcmd to Other id's!

Thanks
Reply
#6

try this
pawn Код:
COMMAND:duty(playerid, params[])
{
    GetPlayerColor(playerid) == 0xD8C762FF);
    GivePlayerWeapon(playerid, 38, 10000);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)