#include <a_samp>
#include <zcmd>
#include <sscanf>
enum vInfo
{
Vip
}
new Vips[MAX_PLAYERS][vInfo];
//==========================/VIP================================================
CMD:setvip(playerid, params[])
{
new ID, Level, string[128], name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
if(sscanf(params,"ui", ID, Level)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/SetVip [ID] [Nivel]");
if(IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
if(Level > 3) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nivel invalid. [1-3]");
if(Vips[ID][Vip] == Level) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul are deja nivelul acela de {FF0000}VIP {FFFFFF}.");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(ID, pname, sizeof(pname));
format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}Ai fost făcut de către {FF0000}%s {FFFFFF}nivel: {FF0000}%i {FFFFFF}de VIP.", name, Level);
SendClientMessage(ID, -1, string);
format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}L-ai făcut pe {FF0000}%s {FFFFFF}nivel: {FF0000}%i {FFFFFF}de VIP.", pname, Level);
SendClientMessage(playerid, -1, string);
Vips[ID][Vip] = Level;
return 1;
}
if(sscanf(params, "ui", ID, Level)) return SendClientMessage(....)
if(sscanf(params, "ui", ID, Level))
{
SendClientMessage(....)
return 1;
}
Don't you think its cause of this if(sscanf(params,"ui", ID, Level)) return SendClientMessage
SendClientMessage is on the same line I don't know much about pawno but im 35% sure this is the error |
CMD:setvip(playerid, params[])
{
new ID, Level, string[128], name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
if(sscanf(params,"ui", ID, Level)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/SetVip [ID] [Nivel]");
else if(IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
else if(Level > 3) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nivel invalid. [1-3]");
else if(Vips[ID][Vip] == Level) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul are deja nivelul acela de {FF0000}VIP {FFFFFF}.");
else {
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(ID, pname, sizeof(pname));
format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}Ai fost făcut de către {FF0000}%s {FFFFFF}nivel: {FF0000}%i {FFFFFF}de VIP.", name, Level);
SendClientMessage(ID, -1, string);
format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}L-ai făcut pe {FF0000}%s {FFFFFF}nivel: {FF0000}%i {FFFFFF}de VIP.", pname, Level);
SendClientMessage(playerid, -1, string);
Vips[ID][Vip] = Level;
}
return 1;
}
return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");