here
at the top with the news
Код:
/////////////////////////////////////////////PERCARSNEWS/////////////////////////
new dlegend;
/////////////////////////////////////////////END///////////////////////////////////
under ongamemodeinit
Код:
//=======================================================PERSOCARS=======================================
change to the id and location of you ride or other peoples (dlegend = AddStaticVehicle(425,2528.4709,-1677.3651,20.5001,91.9561,0,0);// dlegends personal hunter)
//=================================================================ENDOFPERCARS=============================
place this at the bottom ov your script but change to wat u want and the names
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(newstate == PLAYER_STATE_DRIVER)
{
new Vehicle = GetPlayerVehicleID(playerid);
if(Vehicle == dlegend)
{
if(strcmp(PlayerName,"dlegend",true))
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFB0000FF, "I'm sorry, but this car has been reserved for dlegend");
}
}
}
return 1;
}
to add more do if(newstate == PLAYER_STATE_DRIVER)
{
new Vehicle = GetPlayerVehicleID(playerid);
if(Vehicle == dlegend)
{
if(strcmp(PlayerName,"dlegend",true))
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFB0000FF, "I'm sorry, but this car has been reserved for dlegend");
}
}place this here above fo example
Код:
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(newstate == PLAYER_STATE_DRIVER)
{
new Vehicle = GetPlayerVehicleID(playerid);
if(Vehicle == dlegend)
{
if(strcmp(PlayerName,"dlegend",true))
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFB0000FF, "I'm sorry, but this car has been reserved for dlegend");
}
}
if(newstate == PLAYER_STATE_DRIVER)
{
new Vehicle = GetPlayerVehicleID(playerid);
if(Vehicle == dlegend)
{
if(strcmp(PlayerName,"dlegend",true))
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, 0xFB0000FF, "I'm sorry, but this car has been reserved for dlegend");
}
}
}
return 1;
like so but remeber to add the news for that name and to change it so it matches the fucntion any problems get back to me