Help me with these warnings please. -
Help me please.
Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
CMD:loop(playerid, params[])
{
new str[128];
if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail you cannot teleport!");
if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
SetCameraBehindPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), 1296.9932,1608.1838,5560.0220);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 178.7994);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1312.0313,1604.5643,5560.4512);
SetPlayerFacingAngle(playerid, 160.9468);
}
format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Loop Fun (/loop)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
GameTextForPlayer(playerid, "~w~Objects Loading...", 4000, 3);
SetTimerEx("LoadedObjects", 5000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
CMD:aa(playerid, params[])
{
new str[128];
if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
SetCameraBehindPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), 365.2483,2536.9805,16.2233);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 176.2092);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 391.2109,2539.9592,16.5427);
SetPlayerFacingAngle(playerid, 142.9048);
}
format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Abandoned Airport (/aa)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
CMD:area69(playerid, params[])
{
new str[128];
if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
SetCameraBehindPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), 277.9872,2018.0955,17.2062);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 266.8646);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 275.6482,2026.9867,17.6406);
SetPlayerFacingAngle(playerid, 269.1257);
}
format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Area 69 Stunts (/area69)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
CMD:lsa(playerid, params[])
{
new str[128];
if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
SetCameraBehindPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), 1854.4974,-2380.7664,13.1259);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 243.1534);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1838.6377,-2404.4272,13.5547);
SetPlayerFacingAngle(playerid, 1.3001);
}
format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Los Santos Airport (/lsa)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
CMD:chilliad(playerid, params[])
{
new str[128];
if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail you cannot teleport!");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
SetCameraBehindPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), -2251.6426,-1711.4546,479.7952);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 73.6216);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, -2314.1245,-1693.3069,482.5130);
SetPlayerFacingAngle(playerid, 355.9733);
}
format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Mount Chilliad (/chilliad)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
CMD:lva(playerid, params[])
{
new str[128];
if(GetPlayerState(playerid) != 1 && GetPlayerState(playerid) != 2 && GetPlayerState(playerid) != 3 && GetPlayerState(playerid) != 7)
return SendClientMessage(playerid, COLOR_RED, "[Spawned]: You must be spawned, To use this command!");
if(InP[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot use this command while in Parkour!");
if(InDM[playerid] >= 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport, You're in DM!");
if(pInfo[playerid][Jail] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are in jail, You cannot teleport!");
if(pInfo[playerid][Freeze] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are frozen, Cannot use this command!");
if(InHouse[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[Error]: You are inside the House, Cannot teleport!");
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "[Error]: You cannot teleport while in Passenger seat!");
SetCameraBehindPlayer(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetVehiclePos(GetPlayerVehicleID(playerid), 1308.8009,1318.5787,10.3858);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 278.3416);
}
else
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1307.6665,1350.6819,10.8203);
SetPlayerFacingAngle(playerid, 344.3798);
}
format(str, sizeof(str), "[Teleport]: %s(%d) has teleport to Las Venturas Airport (/lva)", GetName(playerid), playerid);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
Re: Help me with these warnings please. -
Re: Help me with these warnings please. -
Re: Help me with these warnings please. -
For the warnings issue: You're creating variables that you're not using. Erase them and it should be fine. CTRL+F shall help you find them in the code.
Re: Help me with these warnings please. -
Re : Help me with these warnings please. -
Re: Help me with these warnings please. -
Re: Help me with these warnings please. -
Did you put them under OnPlayerCommandText? that would be wrong.
Re: Help me with these warnings please. -