Where do i put this script? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Where do i put this script? (
/showthread.php?tid=570565)
Where do i put this script? -
TheTrue - 11.04.2015
Hello evryone.
I dont know where to put this script the place for it can someone help?Its a create vehicle command.
PHP код:
#define MAX_CARS (yourmax)
enum vehData {
VehID,
VehTeam
};
new VehData[MAX_CARS][vehData];
enum playerData {
pTeam
};
new PlayerData[MAX_PLAYERS][playerData];
CMD:createveh(playerid, params[])
{
static
model,
team;
if (sscanf(params, "dd", model, team))
{
SendClientMessage(playerid, -1, "/createveh <model> <team>");
return 1;
}
return 1;
}
Re : Where do i put this script? -
AlexBlack - 11.04.2015
PHP код:
#define MAX_CARS (yourmax)
enum vehData {
VehID,
VehTeam
};
new VehData[MAX_CARS][vehData];
enum playerData {
pTeam
};
new PlayerData[MAX_PLAYERS][playerData];
in the top of your script ( after includes ), replace (yourmax) for the max vehicles that you want to spawn it.
PHP код:
CMD:createveh(playerid, params[])
{
static
model,
team;
if (sscanf(params, "dd", model, team))
{
SendClientMessage(playerid, -1, "/createveh <model> <team>");
return 1;
}
return 1;
}
in the end of your gamemode ( not in a callback ).
Re: Where do i put this script? -
TheTrue - 11.04.2015
Thanks bro.
Re : Where do i put this script? -
AlexBlack - 11.04.2015
you can , but it's better to put it after the defines.