new Float:PosX[MAX_PLAYERS], Float:PosY[MAX_PLAYERS], Float:PosZ[MAX_PLAYERS], Float:PosA[MAX_PLAYERS], PosI[MAX_PLAYERS];
if(strcmp(cmdtext, "/afk", true) == 0)
{
new string[228];
GetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
GetPlayerFacingAngle(playerid, PosA[playerid]);
PosI[playerid] = (GetPlayerInterior(playerid));
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,198.3797,160.8905,1003.0300);
SetPlayerFacingAngle(playerid,177.0350);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,0);
new away[MAX_PLAYER_NAME];
GetPlayerName(playerid, away, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s is AFK!", away);
GameTextForAll(string, 4000, 6);
return 1;
}
if(strcmp(cmdtext, "/back", true) == 0)
{
SetPlayerPos(playerid, PosX[playerid], PosY[playerid], PosZ[playerid]);
SetPlayerFacingAngle(playerid, PosA[playerid]);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid, PosI[playerid]);
new string[228];
TogglePlayerControllable(playerid,1);
new back[MAX_PLAYER_NAME];
GetPlayerName(playerid, back, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s is BACK!", back);
GameTextForAll(string, 4000, 6);
return 1;
}
bekomme 2 warnings "string" shadows a variable at a preceding level
//Edit Überschrift