Jsisjebwjwj new PlayerObject[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/standoncar", true) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid != INVALID_VEHICLE_ID)
{
// إنشاء كائن يمثل اللاعب
PlayerObject[playerid] = CreateObject(19300, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToVehicle(PlayerObject[playerid], vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
SetPlayerPos(playerid, GetVehiclePos(vehicleid));
SetPlayerAttachedObject(playerid, 0, 19300, 2, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
}
return 1;
}
return 0;
}