vmiért nem jó, 1 parancsot akarok vele átírni és:
C:\\Users\\Stuntzor\\Desktop\\asdasd\\gamemodes\\MalibuCool.pwn(1782) : error 002: only a single statement (or expression) can follow each \"case\"
C:\\Users\\Stuntzor\\Desktop\\asdasd\\gamemodes\\MalibuCool.pwn(1782) : warning 215: expression has no effect
vmiért nem jó, 1 parancsot akarok vele átírni és:
C:\\Users\\Stuntzor\\Desktop\\asdasd\\gamemodes\\MalibuCool.pwn(1782) : error 002: only a single statement (or expression) can follow each \"case\"
C:\\Users\\Stuntzor\\Desktop\\asdasd\\gamemodes\\MalibuCool.pwn(1782) : warning 215: expression has no effect
Illeszd be a parancsot is kérlek
tessék
if(strcmp(cmd, \"/hitman\", true) == 0) {
switch (Nyelv[playerid])
{
case 0: //Ez itt a 0-ás azaz a magyar
{
//new tmp[100];
tmp = strtok(cmdtext, idx);
//new id;
new amm;
if(!strlen(tmp)) {
SendClientMessage(playerid, ADMIN_RED, \"Használat: /hitman [playerid/név] [összeg]\");
}
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, ADMIN_RED, \"Hiba: Nincs ilyen játékos!\");
else if (amm < 1) SendClientMessage(playerid, ADMIN_RED, \"Hiba: Rossz összeg!\");
else if (GetPlayerMoney(playerid) < amm) SendClientMessage(playerid, ADMIN_RED, \"Hiba: Nincs rá elég pénzed!\");
else{
Info[id][hit] += amm;
new namep[MAX_PLAYER_NAME], namep2[MAX_PLAYER_NAME];
GetPlayerName(playerid, namep, sizeof (namep));
GetPlayerName(id, namep2, sizeof (namep2));
format(string, sizeof string, \"%s vérdíjat tûzött ki %s fejére! Aki megöli %s-t $%d jutalomban részesül!\", namep, namep2, namep2, Info[id][hit]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
}
case 1: //Ez itt az 1-es azaz angol
{
//new tmp[100];
tmp = strtok(cmdtext, idx);
//new id;
new amm;
if(!strlen(tmp)) {
SendClientMessage(playerid, ADMIN_RED, \"Usage: /hitman [playerid / name] [amount]\");
}
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, ADMIN_RED, \"Error: No such player!\");
else if (amm < 1) SendClientMessage(playerid, ADMIN_RED, \"Error: Invalid amount!\");
else if (GetPlayerMoney(playerid) < amm) SendClientMessage(playerid, ADMIN_RED, \"Error: Not enough money on it!\");
else{
Info[id][hit] += amm;
new namep[MAX_PLAYER_NAME], namep2[MAX_PLAYER_NAME];
GetPlayerName(playerid, namep, sizeof (namep));
GetPlayerName(id, namep2, sizeof (namep2));
format(string, sizeof string, \"%s set a bounty on %s head! Anyone who kills for %s $%d rewarded!\", namep, namep2, namep2, Info[id][hit]);
SendClientMessageToAll(COLOR_ORANGE, string);
}
}
return 1;
}