30.03.2009, 11:47
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:
And when I implant this:
Under:
It doesn't show the MSG....
Whats the problem?
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;
}
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);
}
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
Whats the problem?