Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:vspawn(playerid, params[])
- {
- if(GetPVarInt(playerid, "adminscore") >= 1)
- {
- new vid, Float:x, Float:y, Float:z, Float:ang, car, string[128];
- if (!sscanf(params, "k<vehicle>", vid))
- {
- if (vid)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
- {
- GetVehicleZAngle(GetPlayerVehicleID(playerid), ang);
- DestroyVehicle(GetPlayerVehicleID(playerid));
- }
- else if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- if (GetPVarInt(playerid, "lastvehicle"))
- {
- DestroyVehicle(GetPVarInt(playerid, "lastvehicle"));
- }
- }
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, ang);
- car = AddStaticVehicle(vid, x, y, z, ang, 183, 183);
- SetVehicleNumberPlate(car, "Admin");
- SetVehicleHealth(car, 100000000);
- PutPlayerInVehicle(playerid, car, 0);
- Create3DTextLabel(string, COLOR_RED, 0.0, 0.0, 0.0, 50.0, 0, 1 );
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_BLUE, "/vspawn [Model-ID/-Name]");
- }
- }
- else
- {
- new string[128];
- format(string, sizeof(string), "Türsteher: %s wurde gekickt. - Grund: /vspawn ist nur für Mods und Admins!", GetName(playerid));
- SendClientMessageToAll(COLOR_RED, string);
- Kick(playerid);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment