Need help with Strcmp :S
#7

still dont work ..
and yes its saves in the file correct..
maybe its some other problem with the code.. here is my whole code for this function:

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_WALK)
	{
	if(IsPlayerInAnyVehicle(playerid))
	{
	if(GetPlayerVehicleSeat(playerid) == 0)
	{
	new CarID = GetPlayerVehicleID(playerid);
	new string[100];
	format(string, sizeof(string),"/Cars/Car(%d).Cfg", CarID);
	if(!strcmp(GetName(playerid), dini_Get(string, "Owner"), true))
	{
	if(CarInfo[CarID][Engine] == 0)
	{
	CarInfo[CarID][Engine] = 1;
	TogglePlayerControllable(playerid, 1);
	}
	}
	else
	{
	SendClientMessage(playerid, Red, "You have no keys for this car.");
	}
	}
	}
	return 1;
	}
return 1;
}
btw: getname function:

stock GetName(playerid)
{
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
return PlayerName;
}
Reply


Messages In This Thread
Need help with Strcmp :S - by [Nino] - 05.07.2010, 16:54
Re: Need help with Strcmp :S - by woot - 05.07.2010, 16:56
Re: Need help with Strcmp :S - by DeathOnaStick - 05.07.2010, 17:00
AW: Need help with Strcmp :S - by [Nino] - 05.07.2010, 17:06
Re: Need help with Strcmp :S - by dice7 - 05.07.2010, 17:07
Re: Need help with Strcmp :S - by -Sneaky- - 05.07.2010, 17:11
AW: Need help with Strcmp :S - by [Nino] - 05.07.2010, 17:25
Re: Need help with Strcmp :S - by dice7 - 05.07.2010, 17:29
AW: Need help with Strcmp :S - by [Nino] - 05.07.2010, 17:37
Re: Need help with Strcmp :S - by -Sneaky- - 05.07.2010, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)