28.06.2012, 14:24
Hi, how can i do like if "CrazyChoco" Connects every time he will get 1000 in money, and thats because of the script reads his ip? Ask if you didnt understand what i mean
public OnPlayerConnect(playerid)
{
new name[24];
if(strmatch(name, "CrazyChoco"))
{
GivePlayerMoney(playerid, 1000);
}
return 1;
}
stock strmatch(const String1[], const String2[])
{
if ((strcmp(String1, String2, true, strlen(String2)) == 0) && (strlen(String2) == strlen(String1)))
{
return true;
}
else
{
return false;
}
}
PlayerData[playerid][IP]
Originally Posted by Robert West
Nize , lolz
|
public OnPlayerConnect(playerid)
{
new ip[16];
GetPlayerIp(playerid,ip,sizeof(ip));
if(strcmp(ip,"127.0.0.1",true))
{
GivePlayerMoney(playerid,1000);
}
return 1;
}
Actually, that varies (depends on what country your from).
Anyhow, if you are only doing it for one specific IP address: pawn Код:
|