30.08.2010, 17:32
pawn Код:
if(strcmp(cmdtext,"/rcar",true) == 0)
{
new car = randomEx(400,611),vehicleid;
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
vehicleid = CreateVehicle(car,x,y,z,a,-1,-1,-1);
PutPlayerInVehicle(playerid,vehicleid,0);
return 1;
}
pawn Код:
stock randomEx(minnum = cellmin, maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
//Credits: ******