Quote:
Originally Posted by Ken97
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new ownername[50]; new player1; new owner; owner = AVehicleData[vehicleid][Owner];// symbol is assigned a value that is never used: owner GetPlayerName(player1, ownername, sizeof(ownername)); if(!strcmp(owner,ownername , false))//argument type mismatch(argument 1) { new string[128]; format(string,sizeof(string), "You are not the owner of this vehicle"); SendClientMessage(playerid, 0x0FF0000AA, string); } return 1; }
See errors above
|
First of all.. why do you keep changing what i've made ? you keep chaging playerid to player1 ? what for ? and [MAX_PLAYER_NAME] to [50] ?
This V compiles fine for me..
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new ownername[MAX_PLAYER_NAME];
GetPlayerName(playerid, ownername, sizeof(ownername));
if(!strcmp(ownername,AVehicleData[vehicleid][Owner],false))
{
new string[128];
format(string,sizeof(string), "You are not the owner of this vehicle");
SendClientMessage(playerid, 0x0FF0000AA, string);
}
return 1;
}