Tag die Damen und herren
Ich hab eben ein FS gedownloadet womit man die Nummernschilder ändern kann...
diese würde ich nur gerne speichern... Könnte mir wer erklären wie ich das anstelle bzw.
ihr? [Wahrscheinlich ist das einfacher ^^]
#include <a_samp>
#pragma tabsize 0
#define COLOR_YELLOW 0xFFFF00AA
new gPlayerVehicle[MAX_PLAYERS];
new Float:carposition[4];
forward VehPlate(playerid);
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,COLOR_YELLOW," Number Plate script is ON.. Type /nomer to change your plate. made by [TDM]pRime");
return 1;
}
public VehPlate(playerid)
{
SetVehiclePos(gPlayerVehicle[playerid],carposition[0],carposition[1],carposition[2]);
SetVehicleZAngle(gPlayerVehicle[playerid],carposition[3]);
PutPlayerInVehicle(playerid,gPlayerVehicle[playerid],0);
TogglePlayerControllable(playerid,true);
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
public OnFilterScriptInit()
{
print("[FS]|-----------------------------------------------|[FS]");
print("[FS]| .:[ - Number Plate by [TDM]pRime - ]:.|[FS]");
print("[FS]| .:[----------------------------------------]:.|[FS]");
print("[FS]|-----------------------------------------------|[FS]");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256],idx;
cmd = strtok(cmdtext,idx);
//-----------------------commands----------------------
if(strcmp(cmd,"/schild",true)==0)
{
new tmp[256];
new vehicleid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) != 2)
{
SendClientMessage(playerid,COLOR_YELLOW," You must be the driver of the car, to change your plate.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_YELLOW," Usage: /schild [TEXT]");
SendClientMessage(playerid,COLOR_YELLOW," HINT: use - (like a space)");
return 1;
}
if(strlen(tmp)<0 || strlen(tmp)>8)
{
SendClientMessage(playerid,COLOR_YELLOW," Number Plates can only be 1-8 characters!");
return 1;
}
else
{
GetVehiclePos(vehicleid,carposition[0],carposition[1],carposition[2]);
GetVehicleZAngle(vehicleid,carposition[3]);
SetVehicleNumberPlate(vehicleid,tmp);
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,false);
SetVehicleToRespawn(vehicleid);
gPlayerVehicle[playerid] = vehicleid;
SetTimerEx("VehPlate",700,0,"i",playerid);
SendClientMessage(playerid,COLOR_YELLOW," There will be a very short delay and Number Plate is set.");
return 1;
}
}
return 0;
}
Schöne Grüße