25.11.2011, 20:11
The title says: How can i make a full FS to work only for specific skin ID's? These would be skin ID's 280-287. Someone's help, thanks.
if(GetPlayerSkin(playerid) == Skin id );
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(29) : error 036: empty statement
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(31) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(34) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(36) : error 021: symbol already defined: "CreateStrip"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(37) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(39) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(41) : error 021: symbol already defined: "DeleteClosestStrip"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(42) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(44) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(46) : error 021: symbol already defined: "DeleteAllStrip"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(47) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(50) : error 010: invalid function or declaration
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(52) : warning 203: symbol is never used: "ploca"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(52) : warning 203: symbol is never used: "plocx"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(52) : warning 203: symbol is never used: "plocy"
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(52) : warning 203: symbol is never used: "plocz"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
12 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(GetPlayerSkin(playerid) == 280);
}
if (strcmp(cmd,"/createstrip",true) == 0)
{
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
return 1;
}
else if (strcmp(cmd,"/removestrip",true) == 0)
{
DeleteClosestStrip(playerid);
return 1;
}
else if (strcmp(cmd,"/removeallstrip",true) == 0)
{
DeleteAllStrip();
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if(GetPlayerSkin(playerid) == 280);
{
if (strcmp(cmd,"/createstrip",true) == 0) {
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
return 1;
}
else if (strcmp(cmd,"/removestrip",true) == 0) {
DeleteClosestStrip(playerid);
return 1;
}
else if (strcmp(cmd,"/removeallstrip",true) == 0) {
DeleteAllStrip();
return 1;
}
}
return 0;
}
C:\Users\Da' J'\Desktop\GTA San Andreas modfiles\Raven's Roleplay 0.3c V4.2\filterscripts\SpikeStrip.pwn(28) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
if(GetPlayerSkin(playerid) == 280); // It shoudn't be with ";"
if(GetPlayerSkin(playerid) == 280)
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if(GetPlayerSkin(playerid) == 280)
{
if (strcmp(cmd,"/createstrip",true) == 0) {
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
return 1;
}
else if (strcmp(cmd,"/removestrip",true) == 0) {
DeleteClosestStrip(playerid);
return 1;
}
else if (strcmp(cmd,"/removeallstrip",true) == 0) {
DeleteAllStrip();
return 1;
}
}
return 0;
}
if(GetPlayerSkin(playerid) == 280 ||
GetPlayerSkin(playerid) == 281 ||
GetPlayerSkin(playerid) == 282 ||
GetPlayerSkin(playerid) == 283 ||
GetPlayerSkin(playerid) == 284 ||
GetPlayerSkin(playerid) == 285 ||
GetPlayerSkin(playerid) == 286)
{
//code here
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if(GetPlayerSkin(playerid) == 280 || if(GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286)
{
if (strcmp(cmd,"/createstrip",true) == 0) {
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateStrip(plocx,plocy,plocz,ploca);
return 1;
}
else if (strcmp(cmd,"/removestrip",true) == 0) {
DeleteClosestStrip(playerid);
return 1;
}
else if (strcmp(cmd,"/removeallstrip",true) == 0) {
DeleteAllStrip();
return 1;
}
}
return 0;
}
Try this
pawn Код:
|