21.03.2014, 00:36
How would I go about making it so I can enter a certain vehicle ID?
Код:
command(entervan, playerid, params[]) { new name[256], string[256], Float:x, Float:y, Float:z; format(name, sizeof(name), "Harry_Brown"); new id = GetPlayerID(name); GetVehiclePos(Player[id][Car2LinkID], x, y, z); if(IsPlayerInRangeOfPoint(playerid, 5, x, y, z)) { format(string, sizeof(string), "* %s opens the door of the Journey, and enters it.", GetName(playerid)); NearByMessage(playerid, PURPLE, string); SetPlayerPos(playerid, 2513.4495,-1729.1093,778.6371); } return 1; } command(exitvan, playerid, params[]) { new name[256], string[256], Float:x, Float:y, Float:z; format(name, sizeof(name), "Harry_Brown"); new id = GetPlayerID(name); if(IsPlayerInRangeOfPoint(playerid, 5, 2513.4495,-1729.1093,778.6371 )) { format(string, sizeof(string), "* %s opens the door of the Journey, leaving it.", GetName(playerid)); NearByMessage(playerid, PURPLE, string); GetVehiclePos(Player[id][Car2LinkID], x, y, z); SetPlayerPos(playerid, x-2, y, z); } return 1; }