Sometimes i dont know the simplest stuff. XD! lolz. |
if (strcmp(command. .........)) { new vehid = CreateVehicle(.............); PutPlayerInVehicle(playerid, vehid, 0); return 1; }
C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(164) : warning 202: number of arguments does not match definition C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(164) : warning 202: number of arguments does not match definition C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(164) : warning 202: number of arguments does not match definition C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(164) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Warnings.
if (strcmp("/nrg", cmdtext, true, 10) == 0) { if(GetPlayerMoney(playerid) <= 17750) return SendClientMessage(playerid,red, "You need $17,750"); new vehid = CreateVehicle(522,3220.9900,-2424.9033,2.5561); PutPlayerInVehicle(playerid, vehid, 522); SendClientMessage(playerid,yellow,"you have succesfully purchased an nrg motorcycle."); return 1; }
command: /nrg - check if the player has enough money > no? close command > yes? continue command - creates a vehicle at playerids location - put playerid on the vehicle - charge money - make a nice message
if (strcmp("/nrg", cmdtext, true) == 0) // check command
{
if(GetPlayerMoney(playerid) <= 17750) // check money
return SendClientMessage(playerid,red, "You need $17,750"); // if not enough money, stop the command, else continue
// now we need the player position
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid,x,y,z);
a = GetPlayerFacingAngle(playerid);
// now create the vehicle and put the player on it
new vehid = CreateVehicle(model, x, y, z, a, color1, color2, respawn_delay);
PutPlayerOnVehicle(playerid, vehid, 0);
// charge money
GivePlayerMoney(playerid, -17750);
// message
SendClientMessage(playerid, COLOR_SOMETHING, "Here's your NRG-500!");
// end command
return 1;
}
C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(176) : warning 202: number of arguments does not match definition C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(179) : error 017: undefined symbol "model" C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(180) : error 017: undefined symbol "PutPlayerOnVehicle" C:\Users\rac\Desktop\gtasa and samp\filterscripts\pchs.pwn(179) : warning 204: symbol is assigned a value that is never used: "vehid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
if (strcmp("/nrg", cmdtext, true) == 0) // check command
{
if(GetPlayerMoney(playerid) <= 17750) // check money
{
return SendClientMessage(playerid,red, "You need $17,750"); // if not enough money, stop the command, else continue
}
// now we need the player position
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid,x,y,z);
a = GetPlayerFacingAngle(playerid);
// now create the vehicle and put the player on it
new vehid = CreateVehicle(model, x, y, z, a, color1, color2, respawn_delay);
PutPlayerOnVehicle(playerid, vehid, 0);
// charge money
GivePlayerMoney(playerid, -17750);
// message
SendClientMessage(playerid, COLOR_SOMETHING, "Here's your NRG-500!");
// end command
return 1;
}