|
Originally Posted by jaksimaksi
Hi how i can make a spawn zone, like zone in ls, sf, lv and in that zone players can spawn cars? I have car spawning script. I just need to create that zone, can someone can teach me? thx
|
if(Your Spawn Command){
if(IsPlayerInRangeOfPoint(playerid,DISTANCE,X,Y,Z)){
Your Spawn Function.
}else{
SendClientMessage(playerid,COLOR_RED,"You're not in a spawn zone.");
}
}
|
Originally Posted by jaksimaksi
Can you make me the code? this is car spawning script:
Код:
new Float: angl;
GetPlayerFacingAngle(playerid, angl);
new Float: cx, Float: cy, Float: cz;
GetPlayerPos(playerid, cx, cy, cz);
{
}
{
for(new i; i < 24; i++)
{
if(params[0] == CarNames[i][0] && params[1] == CarNames[i][1] && params[2] == CarNames[i][2])
{
new id = CreateVehicle(CarIds[i], cx, cy, cz, angl, 3, 1, never);
PlayerPlaySound(i,1047,0.0,0.0,0.0);
PutPlayerInVehicle(playerid, id, 0);
return 1;
}
}
return SendClientMessage(playerid, AAD_COLOR_GREY, "This vehicle dont exist");
}
}
Код:
0.1807,2470.0994,16.4844 |
new Float: angl;
GetPlayerFacingAngle(playerid, angl);
new Float: cx, Float: cy, Float: cz;
GetPlayerPos(playerid, cx, cy, cz);
if(IsPlayerInRangeOfPoint(playerid,20.0,0.1807,2470.0994,16.4844))
{
for(new i; i < 24; i++)
{
if(params[0] == CarNames[i][0] && params[1] == CarNames[i][1] && params[2] == CarNames[i][2])
{
new id = CreateVehicle(CarIds[i], cx, cy, cz, angl, 3, 1, never);
PlayerPlaySound(i,1047,0.0,0.0,0.0);
PutPlayerInVehicle(playerid, id, 0);
return 1;
}
}
return SendClientMessage(playerid, AAD_COLOR_GREY, "This vehicle dont exist");
}else SendClientMessage(playerid,0xAA3333AA,"You're not in the spawn zone");
}
2300.3691,2465.9958,-7.4531 2303.6707,2462.3679,-7.4531 2295.4915,2462.5503,-7.4531 2305.9221,2467.1360,-7.4531 2307.6660,2461.4766,-7.4531 2310.6240,2463.6145,-7.4531 2310.8337,2467.3267,-7.4531 2307.1555,2469.0911,-7.4531 2302.5771,2471.1018,-7.4531 2296.9460,2473.2600,-7.4531
|
Originally Posted by jaksimaksi
Could someone help? -_-
|
if(IsPlayerInRangeOfPoint(playerid,20.0,0.1807,2470.0994,16.4844) || IsPlayerInRangeOfPoint(playerid,20.0,ANOTHER_X,ANOTHER_Y,ANOTHER_Z) || ...)