19.01.2012, 18:08
PHP код:
CMD:call(playerid, params[])
{
if(PlayerInfo[playerid][Phone] == phone_yes)
{
if(phoneon[playerid] == true)
{
if(callout[playerid] == false)
{
if(isoncall[playerid] == false)
{
new pnumber;
if(!sscanf(params, "i", pnumber))
{
foreach(Player, i)
{
if(PlayerInfo[i][Phone] == phone_yes)
{
if(PlayerInfo[i][PhoneNumber] == pnumber)
{
if(isoncall[i] == false)
{
if(phoneon[i] == true)
{
-----> THIS LINE GIVES THE WARNING if(!i == playerid)
{
new string[256];
I used that line to make sure it wont use the player's id as i since i has the same settings as playerid.
Is this a wrong way to use this? Or am I just tottaly wrong or something?
Please help me find a better way to do this:
GOAL: Making sure that it wont define [i] as playerid