[HELP] Comparing names
#5

i got a smiliar problem ill need to check a name after a result from a database and need to compared with the current name but i dont now how to do it
pawn Код:
if(mysql_fetch_row(line)) //Fetches the line
            {
                   new data[2];//The data strings
                   new data2[4]; //The data variables
                   GetPlayerName(playerid,pname,24);
                   sscanf(line, "p|dds",data2[1], data2[2],data[1]); //Splits the line with sscanf
                   //vehicleowner = data[1];
                   mysql_real_escape_string(data[1],vehicleowner);
                   mysql_real_escape_string(pname,escpname);
                   //format(string,sizeof(string),"%s != %s",escpname,vehicleowner);
                   if(GetPlayerName(playerid,pname,24) != vehicleowner[24])
                   {
                   SendClientMessage(playerid,COLOR_YELLOW,"You have been removed from the vehicle. You are not the owner");
                   format(string, sizeof(string), "This vehicle is registered to Player: %s",vehicleowner);
                   SendClientMessage(playerid, COLOR_YELLOW, string);
                   RemovePlayerFromVehicle(playerid);
                   mysql_free_result();
            }]
As you may see i tried it with different ways but not luck
Reply


Messages In This Thread
[HELP] Comparing names - by XxCozzaxX - 02.01.2011, 13:41
Re: [HELP] Comparing names - by HyperZ - 02.01.2011, 13:45
Re: [HELP] Comparing names - by fangoth1 - 02.01.2011, 13:45
Re: [HELP] Comparing names - by Mean - 02.01.2011, 14:47
AW: [HELP] Comparing names - by xerox8521 - 08.02.2011, 14:23

Forum Jump:


Users browsing this thread: 1 Guest(s)