17.10.2011, 16:58
Im having some warnings...im beginner so idk why...the script is dahley's im only re-editing it...
ERRORS
PHP код:
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_BLUE 0x33CCFFAA
#define FILTERSCRIPT
new Float:naty[500];
new Float:positions[MAX_PLAYERS][3];
new PlayerIsAFK[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/afk", true))
{
if PlayerIsAFK[playerid] = 0*then
{
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "--) %s Has entered AFK mode.", pName);
SendClientMessage(playerid,COLOR_YELLOW, "You are now in AFK mode. Use /back to go back!");
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid, 0);
GetPlayerHealth(playerid, naty[playerid]);
GetPlayerPos(playerid, positions[playerid][0], positions[playerid][1], positions[playerid][2]);
SetPlayerPos(playerid, 2879.5769,2523.5569,10.8203);
SetPlayerHealth(playerid, 999999999999999.99);
PlayerIsAFK[playerid] = 1;
return 1;
}
}
if(strcmp(cmdtext, "/back", true) == 0)
{
if PlayerIsAFK[playerid] = 1*then
{
new pName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "--) %s Is now back.", pName);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid, 1);
SetPlayerHealth(playerid, naty[playerid]);
SetPlayerPos(playerid, positions[playerid][0], positions[playerid][1], positions[playerid][2]);
PlayerIsAFK[playerid] = 0;
}
return 1;
}
return 0;
}
PHP код:
C:\Documents and Settings\scry\My Documents\Downloads\AFKsystemv2.pwn(15) : warning 211: possibly unintended assignment
C:\Documents and Settings\scry\My Documents\Downloads\AFKsystemv2.pwn(34) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.