new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
//put your command code here...
}
else
{
SendCLientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
#include <a_samp> #include <SpikeStrip> #define playerskin = GetPlayerSkin(playerid); 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 OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new idx; cmd = strtok(cmdtext, idx); if (strcmp(cmd,"/spike",true) == 0) { new Floatlocx,Floatlocy,Floatlocz,Floatloca; GetPlayerPos(playerid, plocx, plocy, plocz); GetPlayerFacingAngle(playerid,ploca); CreateStrip(plocx,plocy,plocz,ploca); return 1; } else if (strcmp(cmd,"/rspike",true) == 0) { DeleteClosestStrip(playerid); return 1; } else if (strcmp(cmd,"/raspike",true) == 0) { DeleteAllStrip(); return 1; } return 0; } |
#include <a_samp>
#include <SpikeStrip>
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 OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd,"/spike",true) == 0)
{
new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
new Floatlocx,Floatlocy,Floatlocz,Floatloca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
}
else
{
SendCLientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
return 1;
}
else if (strcmp(cmd,"/rspike",true) == 0)
{
new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
DeleteClosestStrip(playerid);
}
else
{
SendCLientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
return 1;
}
else if (strcmp(cmd,"/raspike",true) == 0)
{
new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
DeleteAllStrip();
}
else
{
SendCLientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
return 1;
}
return 0;
}
C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(37) : error 017: undefined symbol "plocx" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(3 : error 017: undefined symbol "ploca" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(39) : error 017: undefined symbol "plocx" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(36) : warning 203: symbol is never used: "Floatloca" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(36) : warning 203: symbol is never used: "Floatlocz" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(36) : warning 203: symbol is never used: "Floatlocy" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(36) : warning 203: symbol is never used: "Floatlocx" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(43) : error 017: undefined symbol "SendCLientMessage" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(57) : error 017: undefined symbol "SendCLientMessage" C:\Users\Elvis_V\Desktop\My server's\COP N ROBBERS\filterscripts\testsw.pwn(71) : error 017: undefined symbol "SendCLientMessage" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors. |
#include <a_samp>
#include <SpikeStrip>
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 OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp(cmd,"/spike",true) == 0)
{
new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
return 1;
}
else if (strcmp(cmd,"/rspike",true) == 0)
{
new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
DeleteClosestStrip(playerid);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
return 1;
}
else if (strcmp(cmd,"/raspike",true) == 0)
{
new playerskin;
playerskin = GetPlayerSkin(playerid);
if (playerskin == 285)
{
DeleteAllStrip();
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Sorry you are not SWAT");
}
return 1;
}
return 0;
}
Sorry for the long reply for me to fix the errors Anyways someone else fixed them.
|