SA-MP Forums Archive
Help With Simple Deathmatch Script - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help With Simple Deathmatch Script (/showthread.php?tid=286800)

Pages: 1 2


Help With Simple Deathmatch Script - [BD]SHANU[NR] - 30.09.2011

when i try to compile this script:
Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
	print("\n-----------------------------------------");
	print(" Call Of Duty SA-MP Los Santos DeathMatch");
	print("-------------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        return 1;
    }
return 0;
}

public loadobjects()
{
CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
return 1;
}
i got these errors and warnings:
Code:
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : warning 215: expression has no effect
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: ";", but found ")"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
please help me


Re: Help With Simple Deathmatch Script - nilanjay - 30.09.2011

Quote:
Originally Posted by [BD]SHANU[NR]
View Post
when i try to compile this script:
Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
	print("\n-----------------------------------------");
	print(" Call Of Duty SA-MP Los Santos DeathMatch");
	print("-------------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        return 1;
    }
return 0;
}

public loadobjects()
{
CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
return 1;
}
i got these errors and warnings:
Code:
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : warning 215: expression has no effect
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: ";", but found ")"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
please help me
Try this


Code:
public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
     CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
     CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
     CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
     return 1;
}
Use tab to give a large space.


Re: Help With Simple Deathmatch Script - CJ101 - 30.09.2011

You are missing a bracket.

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lsdm", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
}
return 1;
}
return 0;
}




AW: Help With Simple Deathmatch Script - Nero_3D - 30.09.2011

Same /\


Re: Help With Simple Deathmatch Script - Kingunit - 30.09.2011

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }
   
    return 0;
}

public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}



Re: Help With Simple Deathmatch Script - [BD]SHANU[NR] - 30.09.2011

not working man i still getting errors
Code:
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : warning 215: expression has no effect
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : error 001: expected token: ";", but found ")"
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Help With Simple Deathmatch Script - nilanjay - 30.09.2011

Post line 26


Re: Help With Simple Deathmatch Script - [BD]SHANU[NR] - 30.09.2011

what do u mean man


Re: Help With Simple Deathmatch Script - Zonoya - 30.09.2011

line 26 is SetPlayerPos but i see the problem he has SetPlayerPos(playerid, X, Y); add the last section so like i wanted to tp to the center of SA i would put: SetPlayerPos(playerid, 0, 0, 0); not SetPlayerPos(playerid, 0, 0);


Re: Help With Simple Deathmatch Script - Zonoya - 30.09.2011

like CreateObject is CreateObject(objectid, X, Y, Z, RX, RY, RZ); u need to add the last number to SetPlayerPos


Re: Help With Simple Deathmatch Script - Kingunit - 30.09.2011

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355,-69.0078);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }
   
    return 0;
}

public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}



Re: Help With Simple Deathmatch Script - [BD]SHANU[NR] - 30.09.2011

like this :
Code:
SetPlayerPos(playerid,2037.0355,69.0078,91.4494,0,0,0,0,0,0);
i try'd it its not working


Re: Help With Simple Deathmatch Script - Zonoya - 30.09.2011

no like this:
Code:
SetPlayerPos(playerid,2037.0355,69.0078,91.4494);



Re: Help With Simple Deathmatch Script - Zonoya - 30.09.2011

Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

forward loadobjects();

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355, -69.0078, 91.4494);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }

    return 0;
}

public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}
fixed for ya that works fine


Re: Help With Simple Deathmatch Script - Kingunit - 30.09.2011

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355, -69.0078, 91.4494);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }
   
    return 0;
}

forward loadobjects();
public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}



Re: Help With Simple Deathmatch Script - Zonoya - 30.09.2011

i fixed it already king it needed the extra 91.4494 on SetPlayerPos and loadobjects() needed to be forwarded


Re: Help With Simple Deathmatch Script - Kingunit - 30.09.2011

Quote:
Originally Posted by Zonoya
View Post
i fixed it already king it needed the extra 91.4494 on SetPlayerPos and loadobjects() needed to be forwarded
No need to say that to me. Also there is no reason to double post everytime. Just edit it.


Re: Help With Simple Deathmatch Script - Zonoya - 30.09.2011

sorry didn't mean for that to happen


Re: Help With Simple Deathmatch Script - [BD]SHANU[NR] - 30.09.2011

ohh sry my coords are 1203.6621,-2037.0355,69.0078,91.4494,0,0,0,0,0,0
man it works but it didnt tele me to my place
please help


Re: Help With Simple Deathmatch Script - [BD]SHANU[NR] - 30.09.2011

sry for double post it didnt tele me to my place please help