CMD:frankslave(playerid, params[])
{
new Online;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(strcmp(GetName(i), "Frank", true))
{
Online = 1;
SetPlayerSkin(i, 237);
}
else { Online = 0; }
}
}
if(!strcmp(GetName(playerid), "Tony_Storm"))
{
if(Online == 1) return GameTextForPlayer(playerid, "Frank is not online", 4000, 3);
SendClientMessageToAll(COLOR_RED, "-----------------------------------------");
SendClientMessageToAll(COLOR_RED, "Frank Is a slave now (Owner: Tony_Storm)");
SendClientMessageToAll(COLOR_RED, "----------------------------------------");
SetPlayerSkin(playerid, 147);
}
return 1;
}
GetPlayerName(i, Online, MAX_PLAYER_NAME);
|
Return Values: 0 if strings match each other on given length; 1 o r -1 if some character do not match: string1[i] - string2[i] ('i' represents character index starting from 0); difference in number of characters if one string matches only part of another string. |