Is the IP same check, how?
#4

Quote:
Originally Posted by RyderX
Посмотреть сообщение
No need to check ip to dis-allow yourself to send money to urself,
just use this one:
PHP код:
COMMAND:pay(playeridparams[])
{
  new 
otheridcash;
  if (
sscanf(params"dd"otheridcash)) SendClientMessage(playeridCOLOR_RED"[ERROR]: {FFFFFF}/pay [ID] [Amount]");
  else
  {
    if(
GetPlayerMoney(playerid) < cashSendClientMessage(playeridCOLOR_RED"[ERROR]: {FFFFFF}You don't have that much!");
    else if(!
IsPlayerConnected(otherid)) SendClientMessage(playeridCOLOR_RED"[ERROR]: {FFFFFF}Invalid ID (Player not connected)");
    else if(
otherid == playeridSendClientMessage(playeridCOLOR_RED"[ERROR]: {FFFFFF}Invalid ID (You can't pay yourself)");
    else
    {
      
GivePlayerMoney(playerid, -cash);
      
GivePlayerMoney(otheridcash);
    }
  }
  return 
1;

Dude ... he doesn't to check if it the same player but another character of the same person ... so your answer makes no sense
Reply


Messages In This Thread
Is the IP same check, how? - by aw1337 - 01.01.2017, 23:51
Re: Is the IP same check, how? - by BiosMarcel - 01.01.2017, 23:52
Re: Is the IP same check, how? - by RyderX - 01.01.2017, 23:53
Re: Is the IP same check, how? - by BiosMarcel - 01.01.2017, 23:54
Re: Is the IP same check, how? - by aw1337 - 01.01.2017, 23:56
Re: Is the IP same check, how? - by aw1337 - 02.01.2017, 00:07
Re: Is the IP same check, how? - by RyderX - 02.01.2017, 00:10
Re: Is the IP same check, how? - by BiosMarcel - 02.01.2017, 00:11
Re: Is the IP same check, how? - by aw1337 - 02.01.2017, 00:22
Re: Is the IP same check, how? - by RyderX - 02.01.2017, 00:29

Forum Jump:


Users browsing this thread: 2 Guest(s)