if(strcmp(cmd, "/veiculo", true) == 0) { cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]"); return 1; } new ID; ID = strval(cmd); cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]"); return 1; } new Cor1; Cor1 = strval(cmd); cmd = strtok(cmdtext, idx); if(!strlen(cmd)) { SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]"); return 1; } new Cor2; Cor2 = strval(cmd); new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); AddStaticVehicle(ID, X+2, Y, Z, 0.0, Cor1, Cor2); return SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado"); }
if(strcmp(cmd, "/veiculo", true) == 0)
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new ID;
ID = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor1;
Cor1 = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor2;
Cor2 = strval(cmd);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateVehicle(ID, X+2,Y,Z, 0.0, Cor1, Cor2, 60000);
return SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado");
}
if(strcmp(cmd, "/mudarnome", true) == 0)
{
if(IsPlayerAdmin(playerid)) //Restringe o comando б Admins Rcon
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /mudarnome [seu novo nome]");
return 1;
}
SetPlayerName(playerid, cmd);
SendClientMessage(playerid,0x00FF00AA,"Nome Mudado!");
}
return 1;
}
if(strcmp(cmd, "/veiculo", true) == 0)
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new ID;
ID = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor1;
Cor1 = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor2;
Cor2 = strval(cmd);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
AddStaticVehicle(ID, X, Y, Z, 0.0, Cor1, Cor2);
return SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado");
}
400
611
AddStaticVehicle
Nгo tem nada a ver com o que vocк disse! |
if(strcmp(cmd, "/veiculo", true) == 0)
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new ID;
ID = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor1;
Cor1 = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor2;
Cor2 = strval(cmd);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
AddStaticVehicle(ID, X, Y, Z, 0.0, Cor1, Cor2);
return SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado");
}
Eu adicionei! E mesmo assim pegou normalmente. Teste esse cуdigo e vocк vai ver:
pawn Код:
|
if(strcmp(cmd, "/veiculo", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new ID;
ID = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor1;
Cor1 = strval(cmd);
cmd = strtok(cmdtext, idx);
if(!strlen(cmd))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /veiculo [ID] [COR 1] [COR 2]");
return 1;
}
new Cor2;
Cor2 = strval(cmd);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
AddStaticVehicle(ID, X, Y, Z, 0.0, Cor1, Cor2);
return SendClientMessage(playerid,0x00FF00AA,"Veiculo Criado");
}
else if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFF0000AA,"Vocк nгo й administrador");
}
}