hi.
can anyone help me how to make when player enters vehicle if vehicle not for sale to send him a message : id :"vehicleid here", price:Not For Sale, Owner:"vehicle owner".
and if vehicle for sale send him a message : id :"vehicleid here", price:"any price here", Owner:"vehicle owner".
i'm using gups.
i added this to onplayerentervehicle[pawn]new szMsg[128], nfs[128];
nfs = "nfs";
if(VehicleInfo[vehicleid][Price] == nfs)
{
format(szMsg, 128, "ID: %d, Price: Not For Sale, Owner: %s", VehicleInfo[vehicleid][Id], VehicleInfo[vehicleid][Owner]);
SendClientMessage(playerid, GREEN, szMsg);
}
else if(VehicleInfo[vehicleid][Price] != nfs)
{
format(szMsg, 128, "ID: %d, Price: $%d, Owner: %s", VehicleInfo[vehicleid][Id], VehicleInfo[vehicleid][Price], VehicleInfo[vehicleid][Owner]);
SendClientMessage(playerid, GREEN, szMsg);
}[/pawn]
but when compiling it shows me 2 errors
[pawn]C:\Users\user\Desktop\VCMP Server\gamemodes\GUPS1.16old.pwn(254) : error 033: array must be indexed (variable "nfs")
C:\Users\user\Desktop\VCMP Server\gamemodes\GUPS1.16old.pwn(259) : error 033: array must be indexed (variable "nfs")
Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase
2 Errors.
[/pawn]
Sorry for my bad english!!!