Name Detection
#1

pawn Код:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
new str[128];
new Vehicle = GetPlayerVehicleID(playerid);
format(str,sizeof(str),"/vehicles/%d",Vehicle);
new ow[MAX_PLAYER_NAME];
format(ow,sizeof(ow),"%s",dini_Get(str,"ownername"));
if(fexist(str)&&strcmp(PlayerName,ow,true))
{
SendClientMessage(playerid,COLOR_WHITE,"You have entered your vehicle");

}
else
{
SendClientMessage(playerid,COLOR_WHITE,"this is not your vehicle");
}
The Problem with that code which is placed under OnPlayerStateChange is that when i enter an owned vehicle it says that i am not in my vehicle while the file says that i am the owner anyone have an idea why?
Reply


Messages In This Thread
Name Detection - by AceFlyer - 19.01.2012, 02:14
Re: Name Detection - by SuperViper - 19.01.2012, 02:32
Re: Name Detection - by AceFlyer - 19.01.2012, 03:47
Re: Name Detection - by T0pAz - 19.01.2012, 04:58
Re: Name Detection - by AceFlyer - 19.01.2012, 04:58

Forum Jump:


Users browsing this thread: 2 Guest(s)