if(strcmp(cmd,"/carplate",true)==0) { new vehicleid = GetPlayerVehicleID(playerid); if(PlayerInfo[playerid][pDonation] <= 1) { SendClientMessage(playerid,COLOR_RED,"You must have donated to be able to change your personal license plate"); return 1; } if(GetPlayerState(playerid) != 2) { SendClientMessage(playerid,COLOR_YELLOW,"You must be the driver of a Vehicle to change the personal license plate"); return 1; } /*if(IsPlayerInVehicleWithNoPlates(playerid,vehicleid)) { SendClientMessage(playerid,COLOR_YELLOW,"Your vehicle does not have a personal license plate"); return 1; }*/ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /carplate [car plate text]"); SendClientMessage(playerid,COLOR_YELLOW,"NOTE: To put one or more Spaces, you must put an _ (Underslash)"); return 1; } if(strlen(tmp)<0 || strlen(tmp)>8) { SendClientMessage(playerid,COLOR_YELLOW,"Number Plates can only be 1-8 characters long!"); return 1; } else { GetVehiclePos(vehicleid,VPos[0],VPos[1],VPos[2]); GetVehicleZAngle(vehicleid,VPos[3]); SetVehicleNumberPlate(vehicleid,tmp); RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid,false); SetVehicleToRespawn(vehicleid); gPlayerVehicle[playerid] = vehicleid; SetTimerEx("VehicleTimer",700,0,"i",playerid); SendClientMessage(playerid,COLOR_YELLOW,"There will be a very short delay while your personal license plate is set."); return 1; } }
if(strcmp(cmd,"/carplate",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pDonation] <= 1)
{
SendClientMessage(playerid,COLOR_RED,"You must have donated to be able to change your personal license plate");
return 1;
}
if(GetPlayerState(playerid) != 2)
{
SendClientMessage(playerid,COLOR_YELLOW,"You must be the driver of a Vehicle to change the personal license plate");
return 1;
}
/*if(IsPlayerInVehicleWithNoPlates(playerid,vehicleid))
{
SendClientMessage(playerid,COLOR_YELLOW,"Your vehicle does not have a personal license plate");
return 1;
}*/
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /carplate [car plate text]");
SendClientMessage(playerid,COLOR_YELLOW,"NOTE: To put one or more Spaces, you must put an _ (Underslash)");
return 1;
}
if(strlen(tmp)<0 || strlen(tmp)>8)
{
SendClientMessage(playerid,COLOR_YELLOW,"Number Plates can only be 1-8 characters long!");
return 1;
}
else
{
new Filename[64];
format(Filename, sizeof(Filename), "license/%i.ini", vehicleid);
if(dini_Exists(Filename)) return SendClientMessage(playerid, COLOR_RED, "Your car already has a plate");
dini_Create(Filename);
dini_Set(Filename, "VehicleNumberPlate", tmp);
dini_IntSet(Filename, "Teh", 1);
GetVehiclePos(vehicleid,VPos[0],VPos[1],VPos[2]);
GetVehicleZAngle(vehicleid,VPos[3]);
SetVehicleNumberPlate(vehicleid,tmp);
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid,false);
SetVehicleToRespawn(vehicleid);
gPlayerVehicle[playerid] = vehicleid;
SetTimerEx("VehicleTimer",700,0,"i",playerid);
SendClientMessage(playerid,COLOR_YELLOW,"There will be a very short delay while your personal license plate is set.");
return 1;
}
}
you need to have a register system for this that has donation feature
|
C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(86269) : error 017: undefined symbol "pDonation" C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(86287) : error 017: undefined symbol "tmp" C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(86287) : error 017: undefined symbol "strtok" C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(8628 ![]() C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(86295) : error 017: undefined symbol "tmp" C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(86306) : error 017: undefined symbol "tmp" C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(8630 ![]() C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(8630 ![]() C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(8630 ![]() C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(8630 ![]() C:\Documents and Settings\Abdo\Bureau\American's Dream RP\gamemodes\ADRP.pwn(8630 ![]() Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Errors. |