//In command form if(strcmp(cmd, "/paint", true) == 0) { if(IsPlayerConnected(playerid)) { ChangeVehicleColor(vehicleid, MAINCOLORID, SUBCOLORID); return 1; } //or maybe its this way if you get errors if(strcmp(cmd, "/paint", true) == 0) { if(IsPlayerConnected(playerid)) { ChangeVehicleColor(vehicleid, MAINCOLORID, SUBCOLORID); } return 1; }
//Define this by the others new Veh1; //Under OnGameModeInit veh = GetPlayerVehicleID(playerid); //Command Form if(strcmp(cmd, "/paintjob", true) == 0) { if(IsPlayerConnected(playerid)) { ChangeVehiclePaintjob(Veh1,1 - 5); return 1; }
Originally Posted by zanakinz
God have you ever tried Wiki...
Click here but if your to lazy you can just look right here: Код:
//In command form if(strcmp(cmd, "/paint", true) == 0) { if(IsPlayerConnected(playerid)) { ChangeVehicleColor(vehicleid, MAINCOLORID, SUBCOLORID); return 1; } //or maybe its this way if you get errors if(strcmp(cmd, "/paint", true) == 0) { if(IsPlayerConnected(playerid)) { ChangeVehicleColor(vehicleid, MAINCOLORID, SUBCOLORID); } return 1; } Код:
//Define this by the others new Veh1; //Under OnGameModeInit veh = GetPlayerVehicleID(playerid); //Command Form if(strcmp(cmd, "/paintjob", true) == 0) { if(IsPlayerConnected(playerid)) { ChangeVehiclePaintjob(Veh1,1 - 5); return 1; } |
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/paint", true)==0) {new vehicleid = GetPlayerVehicleID(playerid); new cartype = GetVehicleModel(vehicleid); if(cartype == 560){ // Sultan ChangeVehiclePaintjob(vehicleid, 1 - 3 ); SendClientMessage(playerid,COLOR_BLUE,"[INFO] Sultan tuneado!"); PlayerPlaySound(playerid,1133,0.0,0.0,0.0);} return 1;} return 0; }
//Player Typed /paint
//I would use random paintjobs if I was you.
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
ChangeVehiclePaintJob(vehicle, random(maxpaintjobnumber);
//This will give a random paintjob. This will be alsmost always different.
//Player typed /paint
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
ChangeVehiclePaintJob(vehicle, PaintJob[playerid]);
Paintjob[playerid] ++;
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/paint", true)==0) {new vehicleid = GetPlayerVehicleID(playerid); new cartype = GetVehicleModel(vehicleid); if(cartype == 562){ // Elegy ChangeVehiclePaintjob(vehicleid, Paintjob[playerid]); Paintjob[playerid] ++; SendClientMessage(playerid,COLOR_BLUE,"[INFO] Elegy tuneado!"); PlayerPlaySound(playerid,1133,0.0,0.0,0.0);} return 1;} return 0; }
//On top of the script
new PaintJob[MAX_PLAYERS];
//Back down
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/paint", true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new cartype = GetVehicleModel(vehicleid);
if(cartype == 562){ // Elegy
ChangeVehiclePaintjob(vehicleid, Paintjob[playerid]);
Paintjob[playerid] ++;
SendClientMessage(playerid,COLOR_BLUE,"[INFO] Elegy tuneado!");
PlayerPlaySound(playerid,1133,0.0,0.0,0.0);}
return 1;}
return 0;
}