You got bullied by some internet trolls and decided to leave VCMP forever?
Shame....
Bye Small[H] jkjk
Shame....
Bye Small[H] jkjk
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
//Function to get a Subnet from IP
public GetSubnet(IP[])
{
new IP1[76],IP2[76],counter=0;
IP1=strtok(IP,counter,'.');
IP2=strtok(IP,counter,'.');
new Subnet[72];
format(Subnet,sizeof(Subnet),"%s.%s",IP1,IP2);
return Subnet;
}
public FindPlayerIDFromString(string[])
{// for determining player id from a string -bakasan
// fixed version by aXXo
new player = INACTIVE_PLAYER_ID;
new p = 0;
if ((strlen(string) <= 2) && (isnumeric(string) == 1)) {
if (IsPlayerConnected(strval(string))) return strval(string);
else return INACTIVE_PLAYER_ID;
}
while (p < MAX_PLAYERS) { if (strfind(gPlayers[p],string,true) != -1) { player=p;break; } p++; }
if (player == INACTIVE_PLAYER_ID) {// string didnt match so check if it can be an id
if ((strlen(string) > 2) || (isnumeric(string) == 0)) { return INACTIVE_PLAYER_ID; }
player = strval(string);// string is numeric and not more than 2 digits
}
if (!IsPlayerConnected(player)) { return INACTIVE_PLAYER_ID; }
return player;// valid id found
}