« on: July 31, 2012, 03:33:24 pm »
This script can give some cars the Xmod !
Had a small bug, and I resolved !
Commands: (/c) xmod, smod, xplace.
For go to all cars with Xmod on this script, type "/c xplace" !
I give just 6 examples, but you can add other cars.
Cars Have Xmod On This Script: Sentinel, Hermes, Sabre, Kaufman Taxi, Limo, Burrito.
On Top:new c1,c2,c3,c4,c5,c6,c11,c22,c33,c44,c55,c66;
new xmod[MAX_VEHICLES];
public OnPlayerEnterVehicle:if(xmod[vehicleid] == 1) {
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,COLOR_YELLOW,"Is Busy Now!");
}
if(vehicleid == c1 || vehicleid == c11) {
SendClientMessage(playerid,COLOR_YELLOW,"==> This car have Xmod or S(tock)mod <==");
xmod[c1] = 1;
xmod[c11] = 1;
}
if(vehicleid == c2 || vehicleid == c22) {
SendClientMessage(playerid,COLOR_YELLOW,"==> This car have Xmod or S(tock)mod <==");
xmod[c2] = 1;
xmod[c22] = 1;
}
if(vehicleid == c3 || vehicleid == c33) {
SendClientMessage(playerid,COLOR_YELLOW,"==> This car have Xmod or S(tock)mod <==");
xmod[c3] = 1;
xmod[c3] = 1;
}
if(vehicleid == c4 || vehicleid == c44) {
SendClientMessage(playerid,COLOR_YELLOW,"==> This car have Xmod or S(tock)mod <==");
xmod[c4] = 1;
xmod[c44] = 1;
}
if(vehicleid == c5 || vehicleid == c55) {
SendClientMessage(playerid,COLOR_YELLOW,"==> This car have Xmod or S(tock)mod <==");
xmod[c5] = 1;
xmod[c55] = 1;
}
if(vehicleid == c6 || vehicleid == c66) {
SendClientMessage(playerid,COLOR_YELLOW,"==> This car have Xmod or S(tock)mod <==");
xmod[c6] = 1;
xmod[c66] = 1;
}
public OnPlayerCommandText:else if(strcmp(cmd, "xmod", true) == 0) {
if(IsPlayerInVehicle(playerid,c1)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c1);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c11);
SetVehiclePos(c11,X,Y,Z,Angle);
SetVehicleHealth(c11,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the X Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the S(tock) Mod , type '/c smod!' !");
SetVehicleToRespawn(c11);
SetVehiclePos(c11,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c11);
SetVehiclePos(c1,0,0,0,0);
SetVehicleToRespawn(c1);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(c1,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c2)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c2);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c22);
SetVehiclePos(c22,X,Y,Z,Angle);
SetVehicleHealth(c22,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the X Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the S(tock) Mod , type '/c smod!' !");
SetVehicleToRespawn(c22);
SetVehiclePos(c22,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c22);
SetVehiclePos(c2,0,0,0,0);
SetVehicleToRespawn(c2);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(c2,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c3)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c3);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c33);
SetVehiclePos(c33,X,Y,Z,Angle);
SetVehicleHealth(c33,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the X Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the S(tock) Mod , type '/c smod!' !");
SetVehicleToRespawn(c33);
SetVehiclePos(c33,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c33);
SetVehiclePos(c3,0,0,0,0);
SetVehicleToRespawn(c3);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(c3,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c4)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c4);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c44);
SetVehiclePos(c44,X,Y,Z,Angle);
SetVehicleHealth(c44,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the X Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the S(tock) Mod , type '/c smod!' !");
SetVehicleToRespawn(c44);
SetVehiclePos(c44,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c44);
SetVehiclePos(c4,0,0,0,0);
SetVehicleToRespawn(c4);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(c4,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c5)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c5);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c55);
SetVehiclePos(c55,X,Y,Z,Angle);
SetVehicleHealth(c55,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the X Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the S(tock) Mod , type '/c smod!' !");
SetVehicleToRespawn(c55);
SetVehiclePos(c55,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c55);
SetVehiclePos(c5,0,0,0,0);
SetVehicleToRespawn(c5);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(c5,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c6)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c6);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c66);
SetVehiclePos(c66,X,Y,Z,Angle);
SetVehicleHealth(c66,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the X Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the S(tock) Mod , type '/c smod!' !");
SetVehicleToRespawn(c66);
SetVehiclePos(c66,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c66);
SetVehiclePos(c6,0,0,0,0);
SetVehicleToRespawn(c6);
RemovePlayerFromVehicle(playerid);
SetVehiclePos(c6,0,0,0,0);
}
return 1;
}
else if(strcmp(cmd, "smod", true) == 0) {
if(IsPlayerInVehicle(playerid,c11)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c11);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c1);
SetVehiclePos(c11,X,Y,Z,Angle);
SetVehicleHealth(c1,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the S(tock) Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the X Mod , type '/c xmod!' !");
SetVehicleToRespawn(c1);
SetVehiclePos(c1,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c11);
SetVehiclePos(c11,0,0,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c1);
SetVehiclePos(c11,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c22)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c22);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c2);
SetVehiclePos(c22,X,Y,Z,Angle);
SetVehicleHealth(c2,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the S(tock) Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the X Mod , type '/c xmod!' !");
SetVehicleToRespawn(c2);
SetVehiclePos(c2,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c22);
SetVehiclePos(c22,0,0,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c2);
SetVehiclePos(c22,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c33)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c33);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c3);
SetVehiclePos(c33,X,Y,Z,Angle);
SetVehicleHealth(c3,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the S(tock) Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the X Mod , type '/c xmod!' !");
SetVehicleToRespawn(c3);
SetVehiclePos(c3,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c33);
SetVehiclePos(c33,0,0,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c3);
SetVehiclePos(c33,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c44)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c44);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c4);
SetVehiclePos(c44,X,Y,Z,Angle);
SetVehicleHealth(c4,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the S(tock) Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the X Mod , type '/c xmod!' !");
SetVehicleToRespawn(c4);
SetVehiclePos(c4,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c44);
SetVehiclePos(c44,0,0,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c4);
SetVehiclePos(c44,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c55)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c55);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c5);
SetVehiclePos(c55,X,Y,Z,Angle);
SetVehicleHealth(c5,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the S(tock) Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the X Mod , type '/c xmod!' !");
SetVehicleToRespawn(c5);
SetVehiclePos(c5,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c55);
SetVehiclePos(c55,0,0,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c5);
SetVehiclePos(c55,0,0,0,0);
}
if(IsPlayerInVehicle(playerid,c66)) {
new Float:X,Float:Y,Float:Z,Float:Angle;
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c66);
GetPlayerPos(playerid,X,Y,Z);
PutPlayerInVehicle(playerid,c6);
SetVehiclePos(c66,X,Y,Z,Angle);
SetVehicleHealth(c6,1000);
SendClientMessage(playerid, COLOR_YELLOW, "You selected the S(tock) Mod for your Vehicle!");
SendClientMessage(playerid,COLOR_YELLOW, "To select the X Mod , type '/c xmod!' !");
SetVehicleToRespawn(c6);
SetVehiclePos(c6,X,Y,Z,Angle);
PutPlayerInVehicle(playerid,c66);
SetVehiclePos(c66,0,0,0,0);
RemovePlayerFromVehicle(playerid);
SetVehicleToRespawn(c6);
SetVehiclePos(c66,0,0,0,0);
}
return 1;
}
else if(strcmp(cmd, "xplace", true) == 0) {
SetPlayerPos(playerid,-854.3002,525.9736,11.1007,1.0423,0);
SendClientMessage(playerid,COLOR_YELLOW,"In this place are all cars with Xmod on this script!");
return 1;
}
OnGameModeInit:c1=AddStaticVehicle(135,-845.5019,533.4811,10.6948,1.2191,1,1);
c2=AddStaticVehicle(204,-851.6696,533.7639,10.6947,359.8784,1,1);
c3=AddStaticVehicle(205,-857.4383,534.1587,10.6949,0.9703,1,1);
c4=AddStaticVehicle(212,-863.5768,533.9150,10.6951,359.3430,1,1);
c5=AddStaticVehicle(216,-869.1072,534.2458,10.6947,359.4527,36,0);
c6=AddStaticVehicle(139,-839.9695,536.6782,10.6950,359.7005,1,1);
c11=AddStaticVehicle(174,-609.2595,1234.4337,21.4865,278.7307,0,0);
c22=AddStaticVehicle(164,-608.9079,1226.3947,21.4865,273.4040,1,1);
c33=AddStaticVehicle(206,-608.7878,1219.9231,21.4865,272.7773,1,1);
c44=AddStaticVehicle(179,-608.1953,1212.0464,21.4865,270.2706,1,0);
c55=AddStaticVehicle(188,-608.3098,1200.6761,21.4865,249.9038,36,0);
c66=AddStaticVehicle(201,-612.1787,1241.3369,21.4865,263.6906,0,0);
Finish !Photos [ In left Xmod and in Right S(tock)mod ] :
« Last Edit: July 31, 2012, 03:57:03 pm by sseebbyy »
Logged
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.