new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z) public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/turismo", cmdtext, true, 10) == 0) CreateVehicle(451, float:x, float:y, 82.2873, 34, 34, 1000) SendClientMessage(playerid, 0xAA333399, "Vocк criou um turismo!"); } return 1; } |
C:\Users\Gabriel\Desktop\NF.pwn(97) : error 017: undefined symbol "x" C:\Users\Gabriel\Desktop\NF.pwn(100) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/turismo", cmdtext, true, 7) == 0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos ( playerid,X,Y,Z ) ;
CreateVehicle ( 451,X,Y,Z,0.0,-1,-1,9000000 ) ;
return 1;
}
return 0;
}
if(strcmp(cmdtext, "/criarcarro", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[256], id, Float:x, Float:y, Float:z, Float:a, car;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Use: /criarcarro [id-carro].");
id = strval(tmp);
if(id > 399 && id < 612) // ids dos carros. 400 minimo, 611 mбximo.
{
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
car = CreateVehicle(id, x, y, z, a, -1, -1, 9000000);
PutPlayerInVehicle(playerid, car, 0);
SendClientMessage(playerid, 0xFF3322AA, "Veiculo criado com sucesso !");
return 1;
} else SendClientMessage(playerid, 0xFF0000AA, "(ERRO) ID valido de 400 a 611.");
return 1;
} else SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Vocк nгo й admin.");
return 1;
}
if(strcmp(cmdtext, "/turismo", true) == 0)
{
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateVehicle(451, x, y+3, z, a, -1, -1, 9000000);
return 1;
}