Bei mehreren CMD´s zeigst bei mir an, das der Spieler nicht online ist... hier ein Beispiel:
CMD:givemoney(playerid,params[]) {
new moneys,giveplayerid,giveplayer[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME],playermoney[MAX_PLAYERS],string[64];
if (sscanf(params, "ui",giveplayerid, moneys)) return Inter_SendClientMessage(playerid, COLOR_LIGHTBLUE, "Benutze: /givemoney [playerid] [amount]");
// if (!IsNumeric(giveplayerid)) giveplayerid = ReturnPlayerID(giveplayerid);
if (IsPlayerConnected(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
playermoney[playerid] = GetPlayerCash(playerid);
if (moneys > 0 && playermoney[playerid] >= moneys) {
GivePlayerCash(playerid, (-moneys));
GivePlayerCash(giveplayerid, moneys);
format(string, sizeof(string), "You have sent %s (id: %d), $%d.", giveplayer,giveplayerid, moneys);
Inter_SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "You have recieved $%d from %s (id: %d).", moneys, sendername, playerid);
Inter_SendClientMessage(giveplayerid, COLOR_GREEN, string);
printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
}
else {
Inter_SendClientMessage(playerid, COLOR_BRIGHTRED, "Invalid transaction amount.");
}
}
else {
format(string, sizeof(string), "ID:%d is not an active player.", giveplayerid);
Inter_SendClientMessage(playerid, COLOR_BRIGHTRED, string);
}
return 1;
}
woran liegt das?