Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Who uses California Cops and Robbers i Need help

$
0
0
I have opened the .inc test, which creates checkpoint, rob, enter, and so on.

Who can teach me how it works?

PHP Code:

/********************************
++ California Cops and RObbers ++
++       By Bondowocopz        ++
********************************/
#define istest      1 // Uncomment This Line If You Want To Use Some Test Command On Test.inc
#define USE_SOCKET 1 // Uncomment this line if you want to use socket 

PHP Code:

COMMAND:testdata(playeridparams[])
{
    new 
data[50], abFloat:cFloat:d;
    
format(datasizeof(data), "0;20;0.000;1.000");
    if(
sscanf(data"p<;>ddff"abcd))
    {
        
Server(playerid"gagal");
    }
    else
    {
        
printf("A = %d\nB = %d\nC = %f\nD = %f"abcd);
    }
    return 
1;
}

COMMAND:specialaction(playeridparams[])
{
    new 
level;
    if(
sscanf(params"d"level))
    {
        
Usage(playerid"testdrunk <level>");
    }
    else
        
SetPlayerSpecialAction(playeridlevel);
    return 
1;
}

COMMAND:testdrunk(playeridparams[])
{
    new 
level;
    if(
sscanf(params"d"level))
    {
        
Usage(playerid"testdrunk <level>");
    }
    else
        
SetPlayerDrunkLevel(playeridlevel);
    return 
1;
}

#if defined USE_037
COMMAND:createactor(playeridparams[])
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
CreateActor(181xyz0.0);
    return 
1;
}

COMMAND:savedata(playeridparams[])
{
    
saveData(playerid);
    
ResetPlayerWeapons(playerid);
    return 
1;
}

COMMAND:loaddata(playeridparams[])
{
    
loadData(playerid);
    return 
1;
}

COMMAND:createrob(playeridparams[])
{
    new 
store[56], place[56], prize;
    if(
sscanf(params"s[56]s[56]d"storeplaceprize))
    {
        return 
Usage(playerid"createrob <store> <place> <max prize>");
    }
    else
    {
        new 
Float:xFloat:yFloat:zFloat:angmessage[512];
        
GetPlayerPos(playeridxyz);
        
GetPlayerFacingAngle(playeridang);
        
CreateDynamicCP(xyz10.0, -1GetPlayerInterior(playerid));
        
format(messagesizeof(message), "{{%f, %f, %f, %f}, \"%s\", \"%s\", %d, %d},"xyzangstoreplaceGetPlayerInterior(playerid), prize);
        
Log("CPenum.html"messagefalse);
    }
    return 
1;
}

COMMAND:createenter(playeridparams[])
{
    new 
maptype;
    if(
sscanf(params"d"maptype))
    {
        return 
Usage(playerid"createenter <map type>");
    }
    else
    {
        new 
Float:xFloat:yFloat:zFloat:angle;
        
GetPlayerPos(playeridxyz);
        for(new 
0MAX_CPi++)
        {
            if(!
IsValidDynamicCP(GM[CPs][i]))
            {
                
GM[CPs][i]    = CreateDynamicCP(xyz10.0, -1, -1);
                
GetPlayerFacingAngle(playeridangle);
                
Player[playerid][savedPos][0]    = x;
                
Player[playerid][savedPos][1]    = y;
                
Player[playerid][savedPos][2]    = z;
                
Player[playerid][savedPos][3]    = angle;
                
SetPVarInt(playerid"cp"i);
                
SetPVarInt(playerid"map"maptype);
                break;
            }
        }
    }
    return 
1;
}

COMMAND:createexit(playeridparams[])
{
    new 
Float:xFloat:yFloat:zFloat:anglemessage[256];
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridangle);
    
format(messagesizeof(message), "{{%f, %f, %f, %f}, {%f, %f, %f, %f}, %d, %d},"Player[playerid][savedPos][0], Player[playerid][savedPos][1], Player[playerid][savedPos][2], Player[playerid][savedPos][3], xyzangleGetPlayerInterior(playerid), GetPVarInt(playerid"map"));
    
Log("savedPos.html"messagefalse);
    return 
1;
}

COMMAND:back(playeridparams[])
{
    
SetPlayerPos(playeridPlayer[playerid][savedPos][0], Player[playerid][savedPos][1], Player[playerid][savedPos][2]);
    
SetPlayerFacingAngle(playeridPlayer[playerid][savedPos][3]);
    return 
1;
}

COMMAND:createlocker(playeridparams[])
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    
DestroyDynamicObject(GM[tempObj][0]);
    
DestroyDynamicObject(GM[tempObj][1]);
    
DestroyDynamicObject(GM[tempObj][2]);
    
GM[tempObj][0]    = CreateDynamicObject(2003xyz0.00000.0000, -90.000);
    
GM[tempObj][1]    = CreateDynamicObject(2004xyz0.00000.0000, -90.000);
    
GM[tempObj][2]    = CreateDynamicObject(2005xyz0.00000.0000, -90.000);
    return 
1;
}

COMMAND:write(playeridparams[])
{
    new 
Float:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzmsg[1000];
    
GetDynamicObjectPos(GM[tempObj][0], xyz);
    
GetDynamicObjectRot(GM[tempObj][0], rxryrz);
    
format(msgsizeof(msg), "{{%f, %f, %f, %f, %f, %f}, "xyzrxryrz);
    
GetDynamicObjectPos(GM[tempObj][1], xyz);
    
GetDynamicObjectRot(GM[tempObj][1], rxryrz);
    
format(msgsizeof(msg), "%s{%f, %f, %f, %f, %f, %f}, "msgxyzrxryrz);
    
GetDynamicObjectPos(GM[tempObj][2], xyz);
    
GetDynamicObjectRot(GM[tempObj][2], rxryrz);
    
format(msgsizeof(msg), "%s{%f, %f, %f, %f, %f, %f}}"msgxyzrxryrz);
    
Log("saveGan.html"msgfalse);
    return 
1;
}

COMMAND:select1(playeridparams[])
{
    
EditDynamicObject(playeridGM[tempObj][0]);
    return 
1;
}

COMMAND:select2(playeridparams[])
{
    
EditDynamicObject(playeridGM[tempObj][1]);
    return 
1;
}

COMMAND:select3(playeridparams[])
{
    
EditDynamicObject(playeridGM[tempObj][2]);
    return 
1;
}

COMMAND:house(playeridparams[])
{
    new 
houseid;
    if(
sscanf(params"d"houseid))
    {
        
Usage(playerid"house <houseid>");
    }
    else
    {
        if(
houseid >= MAX_HOUSE_INT)
        {
            return 
0;
        }
        else
        {
            
SetPlayerPos(playeridHouseInt[houseid][intPos][0], HouseInt[houseid][intPos][1], HouseInt[houseid][intPos][2]);
            
SetPlayerFacingAngle(playeridHouseInt[houseid][intPos][3]);
            
SetPlayerInterior(playeridHouseInt[houseid][houseintID]);
        }
    }
    return 
1;
}

COMMAND:savepos(playeridparams[])
{
    new 
Float:xFloat:yFloat:zFloat:anglemsg[256];
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridangle);
    
format(msgsizeof(msg), "{%f, %f, %f}"xyz);
    
Log("savedPoz.html"msgfalse);
    return 
1;
}

COMMAND:mapicon(playeridparams[])
{
    if(!
adminLevel(playerid6))
        return 
0;
    new 
Float:xFloat:yFloat:ztype;
    if(
sscanf(params"d"type))
    {
        return 
Usage(playerid"mapicon <icon type>");
    }
    else
    {
        
GetPlayerPos(playeridxyz);
        
DestroyDynamicMapIcon(GM[testIcon]);
        
GM[testIcon]    = CreateDynamicMapIcon(xyztype1);
        
Server(playerid"Map icon successfully created.");
    }
    return 
1;
}

COMMAND:createcp(playeridparams[])
{
    new 
comment[30], Float:xFloat:zFloat:ymsg[56];
    if(
sscanf(params"s[30]"comment))
    {
        
Usage(playerid"createcp <comment>");
    }
    else
    {
        
GetPlayerPos(playeridxyz);
        
format(msgsizeof(msg), "{%f, %f, %f}, // %s"xyzcomment);
        
Log("cptest.html"msgfalse);
    }
    return 
1;
}

COMMAND:saveveh(playeridparams[])
{
    if(
IsPlayerInAnyVehicle(playerid))
    {
        new 
vehicleid GetPlayerVehicleID(playerid);
        new 
msg[512], Float:xFloat:yFloat:zFloat:a;
        
GetVehiclePos(vehicleidxyz);
        
GetVehicleZAngle(vehicleida);
        
format(msgsizeof(msg), "{{%f, %f, %f, %f}, %d},"xyzaGetVehicleModel(vehicleid));
        
Log("savedVeh.html"msgtrue);
    }
    return 
1;
}

COMMAND:addhouse(playeridparams[])
{
    new 
Float:xFloat:yFloat:zFloat:angle;
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridangle);
    
Player[playerid][savedPos][0]    = x;
    
Player[playerid][savedPos][1]    = y;
    
Player[playerid][savedPos][2]    = z;
    
Player[playerid][savedPos][3]    = angle;
    return 
1;
}

COMMAND:savehouse(playeridparams[])
{
    new 
msg[1000];
    new 
Float:xFloat:yFloat:zFloat:angle;
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridangle);
    
format(msgsizeof(msg), "{{%f, %f, %f, %f}, {%f, %f, %f, %f}, %d}"Player[playerid][savedPos][0], Player[playerid][savedPos][1], Player[playerid][savedPos][2], Player[playerid][savedPos][3], xyzangleGetPlayerInterior(playerid));
    
Log("houseEnum.html"msgtrue);
    return 
1;
}

COMMAND:gotofront(playeridparams[])
{
    new 
Float:distanceFloat:xFloat:yFloat:z;
    if(
sscanf(params"f"distance))
    {
        
Usage(playerid"gotofront <distance>");
    }
    else
    {
        
GetXYZInFrontOfPlayer(playeridxyzdistance);
        
SetPlayerPos(playeridxyz);
    }
    return 
1;
}

COMMAND:testmenu(playeridparams[])
{
    new 
Menu:test;
    
test CreateMenu("Test Menu"315.010.05.0);
    
AddMenuItem(test2"TEST GAN");
    
ShowMenuForPlayer(testplayerid);
    return 
1;
}

COMMAND:gotohouse(playeridparams[])
{
    new 
i;
    if(
sscanf(params"d"i))
    {
        
Usage(playerid"gotohouse <id>");
    }
    else
    {
        
SetPlayerPos(playeridHouse[i][housePos][0], House[i][housePos][1], House[i][housePos][2]);
    }
    return 
1;
}

COMMAND:testsound(playeridparams[])
{
    new 
int;
    if(
sscanf(params"d"int))
    {
        
Usage(playerid"testsound <id>");
    }
    else
    {
        
PlayerPlaySound(playeridint0.00.00.0);
    }
    return 
1;


I tried it and it did not work or I did not use it properly.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>