28.09.2010, 13:08
I got this:
Problem is, even though PlayerGang and OtherGang is not the same, it will still teleport the guy. I only want to teleport the person if PlayerGang is the same as OtherGang.. How to do that?
pawn Код:
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerName(i, name, sizeof(name));
format(IsTheSame, sizeof(IsTheSame), "Gangs/Users/%s",name);
SendClientMessageToAll(COLOR_RED, IsTheSame);
if(dini_Isset(IsTheSame, "Gangname"))
{
format(PlayerGang, sizeof(PlayerGang), "%s",dini_Get(string1, "Gangname"));
format(OtherGang, sizeof(OtherGang), "%s",dini_Get(IsTheSame, "Gangname"));
if(strcmp(PlayerGang, OtherGang, false) == 0)
{
SendClientMessageToAll(COLOR_RED, "You are teleported! (1)");
SetPlayerPos(i, -478.9131,-560.6674,25.5234);
SetPlayerHealth(i, 100);
SetPlayerSkin(i, 105);
GivePlayerWeapon(i, 42, 1000);
GivePlayerWeapon(i, 25, 1000);
}
format(PlayerGang, sizeof(PlayerGang), "%s",dini_Get(string2, "Gangname"));
if(strcmp(PlayerGang, OtherGang, false) == 0)
{
SendClientMessageToAll(COLOR_RED, "You are teleported! (2)");
SetPlayerPos(i, -480.1998,-540.8129,25.5296);
SetPlayerHealth(i, 100);
SetPlayerSkin(i, 102);
GivePlayerWeapon(i, 42, 1000);
GivePlayerWeapon(i, 25, 1000);
}
SendClientMessageToAll(COLOR_RED, PlayerGang);
SendClientMessageToAll(COLOR_RED, memberscount);
}
}
}