27.10.2017, 17:26
Hey,
how to get the Wanteds from a Player (Enum)
enum PlayerInfo
{
Adminlevel,
Level,
Fraction,
Team,
sLogin,
Banned,
Prison,
Skin,
pMuted,
aPrison,
Wanteds
};
ocmd: su(playerid,params[])
{
if(IsPlayerCop(playerid))
{
new pid,wid,reason[64];
if(sscanf(params,"uis",pid,wid,reason))return SendClientMessage(playerid,BLAU,"/su [ID] [Wanteds] [Reason]");
if(IsPlayerConnected(playerid))
{
new string[128];
format(string, sizeof(string), "Officer %s has given you %d Wanteds", GetName(playerid),wid);
SendClientMessage(pid, -1, string);
sPlayer[playerid][Wanteds]=sSpieler[playerid][Wanteds]+wid;
}
}
return 1;
}
How to give out the Wanteds?
ocmd:mywtds(playerid,params[])
{
new wid;
new string[128];
format(string, sizeof(string), "You have %d Wanteds!", sSpieler[Wanteds]); I do not know how to query the number of "wanteds"
SendClientMessage(playerid, -1, string);
}
how to get the Wanteds from a Player (Enum)
enum PlayerInfo
{
Adminlevel,
Level,
Fraction,
Team,
sLogin,
Banned,
Prison,
Skin,
pMuted,
aPrison,
Wanteds
};
ocmd: su(playerid,params[])
{
if(IsPlayerCop(playerid))
{
new pid,wid,reason[64];
if(sscanf(params,"uis",pid,wid,reason))return SendClientMessage(playerid,BLAU,"/su [ID] [Wanteds] [Reason]");
if(IsPlayerConnected(playerid))
{
new string[128];
format(string, sizeof(string), "Officer %s has given you %d Wanteds", GetName(playerid),wid);
SendClientMessage(pid, -1, string);
sPlayer[playerid][Wanteds]=sSpieler[playerid][Wanteds]+wid;
}
}
return 1;
}
How to give out the Wanteds?
ocmd:mywtds(playerid,params[])
{
new wid;
new string[128];
format(string, sizeof(string), "You have %d Wanteds!", sSpieler[Wanteds]); I do not know how to query the number of "wanteds"
SendClientMessage(playerid, -1, string);
}