Problem with CarOwnership /buycar MSG - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with CarOwnership /buycar MSG (
/showthread.php?tid=71146)
Problem with CarOwnership /buycar MSG -
Castle - 30.03.2009
I've Implanted the FS of the Carownership I had into my Gamemode...
Now the problem is that it doesn't show me the /buyveh command
here is the DRIVERSTATE:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new vehicleid = GetPlayerStreamVehicleID(playerid);
if(GetCreatorID(vehicleid)!=0)
{
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
{
new ex[128];
format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
SendClientMessage(playerid,COLOR_YELLOW,ex);
}
else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
{
if(!IsPlayerAdmin(playerid)){
TogglePlayerControllable(playerid,0);}
new fffx[128];
format(fffx,sizeof(fffx),"This Vehicle is for Sale. Price %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
SendClientMessage(playerid,COLOR_WHITE,fffx);
SendClientMessage(playerid,COLOR_YELLOW,"Use /buyveh to Buy it.");
}
else
{
TogglePlayerControllable(playerid,0);
TogglePlayerControllable(playerid,1);
new ex[128];
format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
SendClientMessage(playerid,COLOR_YELLOW,ex);
}
}
}
return 1;
}
And when I implant this:
pawn Код:
new vehicleid = GetPlayerStreamVehicleID(playerid);
if(GetCreatorID(vehicleid)!=0)
{
if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
{
new ex[128];
format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
SendClientMessage(playerid,COLOR_YELLOW,ex);
}
else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
{
if(!IsPlayerAdmin(playerid)){
TogglePlayerControllable(playerid,0);}
new fffx[128];
format(fffx,sizeof(fffx),"This Vehicle is for Sale. Price %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
SendClientMessage(playerid,COLOR_WHITE,fffx);
SendClientMessage(playerid,COLOR_YELLOW,"Use /buyveh to Buy it.");
}
else
{
TogglePlayerControllable(playerid,0);
TogglePlayerControllable(playerid,1);
new ex[128];
format(ex,sizeof(ex),"[ Vehicle Owner: %s ]",VehicleSystem[GetCreatorID(vehicleid)][owner]);
SendClientMessage(playerid,COLOR_YELLOW,ex);
}
}
Under:
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
It doesn't show the MSG....
Whats the problem?
Re: Problem with CarOwnership /buycar MSG -
[MK]Soprano - 18.03.2010
You think this;
When you enter buyable car that not showing to type /buycar or /carbuy to buy car