dcmd_setskin(playerid,params[])
{
if(Player[playerid][admin] < 1){
return SendClientMessage (playerid,WEIS,"SERVER: Unknown command.");
}
new pID,skinid;
if(sscanf(params,"ud",pID,skinid)){
return SendClientMessage(playerid,WEIS,"Usage: /setskin [playerid] [skinID 0-299!]");
}
if(!IsPlayerConnected(pID)){
return SendClientMessage(playerid,WEIS,"Nobody is connected with this ID!");
}
if(skinid < 0){
return SendClientMessage(playerid,WEIS,"INVALID ID!");
}
if(skinid > 299){
return SendClientMessage(playerid,WEIS,"INVALID ID!");
}
new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
SetPlayerSkin(pID,skinid);
GetPlayerName(playerid,aname,sizeof(aname));
GetPlayerName(pID,name,sizeof(name));
format(string,sizeof(string),"You have set the SkinID of %s to %d",name,skinid);
format(string2,sizeof(string2),"Admin %s has set your SkinID to %d",aname,skinid);
SendClientMessage(playerid,GRÜN,string);
SendClientMessage(pID,GRÜN,string2);
return 1;
}
Entweder so und so..
dcmd_vehicle(playerid,params[])
{
if(Player[playerid][admin] < 1){
return SendClientMessage (playerid,WEIS,"SERVER: Unknown command.");
}
new veh,color1,color2;
if(sscanf(params,"ddd",veh,color1,color2)){
return SendClientMessage(playerid,WEIS,"Usage: /vehicle [vehicleID] [color1] [color2]");
}
if(veh < 400){
return SendClientMessage(playerid,WEIS,"INVALID vehID![400-611]");
}
if(veh > 611){
return SendClientMessage(playerid,WEIS,"INVALID vehID![400-611]");
}
if(color1 < 0){
return SendClientMessage(playerid,WEIS,"INVALID color1ID![0-126]");
}
if(color1 > 126){
return SendClientMessage(playerid,WEIS,"INVALID color1ID![0-126]");
}
if(color2 < 0){
return SendClientMessage(playerid,WEIS,"INVALID color2ID![0-126]");
}
if(color2 > 126){
return SendClientMessage(playerid,WEIS,"INVALID color2ID![0-126]");
}
new Float:x , Float:y , Float: z, Car;
GetPlayerPos(playerid,x,y,z);
Car = CreateVehicle(veh, x, y, z, 0, color1, color2, 123456789);
SetPlayerPos(playerid,x,y,z);
SetVehiclePos(veh,x,y,z);
PutPlayerInVehicle(playerid, Car, 0);
return 1;
}
MFG.